Sponsored Content
Full Discussion: Mail issue
Operating Systems Solaris Mail issue Post 302767293 by Junaid Subhani on Wednesday 6th of February 2013 02:27:30 PM
Old 02-06-2013
Question Mail issue

Hi guys ! I am using Oracle Ops Center and have configured it to send Emails using the server itself ( localhost port 25 ).

When I goto /var/spool/mqueue folder , there are a few mails residing there but are NOT being sent.
A sample of one file is :

root@ops # cat qfr16JEh2k022885
V8
T1360178203
K1360178233
N1
P124404
I0/27/25407
Mhost map: lookup (oracle.com): deferred
Fs
$_localhost [127.0.0.1]
$rESMTP
$sops
${daemon_flags}
${if_addr}127.0.0.1
S<ORACLE_OPCENTER_US@oracle.com>
MDeferred: Name server: mailhost: host name lookup failure
rRFC822; MY-EMAIL
RPFD:<MY-EMAIL>
H?P?Return-Path: <g>
H??Received: from ops (localhost [127.0.0.1])
by ops (8.14.4+Sun/8.14.4) with ESMTP id r16JEh2k022885
for <MY-EMAIL>; Thu, 7 Feb 2013 00:16:43 +0500 (PKT)
H?D?Date: Thu, 7 Feb 2013 00:14:43 +0500 (PKT)
H??From: ORACLE_OPCENTER_US@oracle.com
H??Message-ID: <723416729.1.1360178203752.JavaMail.root@ops>
H??Subject: CRITICAL incident 11584 created on SMF Service State
svc:/milestone/multi-user-server:default has switched to maintenance
H??MIME-Version: 1.0
H??Content-Type: text/html; charset=ISO646-US
H??Content-Transfer-Encoding: quoted-printable
.


ive replaced my actual Email ID with MY-EMAIL in the above text. Why cant I see a To: field ?

Also ive tried sending a test mail using mailx command and receive it !

What is the problem here ?
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Mail Issue

I am trying to send mail to a pager. I am able to send e-mails to other systems, but this is not sending the message through. The page works but the text message is not displayed. Does anyone see anything wrong with this syntax or have any ideas. We are using Unix 5.2 on an RS6000 box. ... (1 Reply)
Discussion started by: Barb
1 Replies

2. UNIX for Dummies Questions & Answers

Currupt Mail issue in sendmail

I am using sendmail on salaris 9. This server gets a heavy load of emails as big as 100 mb. i nedd suggestion on two issues.1st what can be the most common reason for frequent mail cuurption. 2nd how to fix a currupt email. the method i know is vi and deltting the lines till From is the 1st word of... (0 Replies)
Discussion started by: mazharhasan
0 Replies

3. Shell Programming and Scripting

Issue in mail sending process

Hi I created one CSV file and i need to append some message in the content of my mail. $sales=sales.dat $sales_csv=sales.csv $sales_report=sales.txt this is the command am using it. echo "sales for `date`"| read subject uuencode $sales $sales_csv | mailx -ms "${subject}."... (2 Replies)
Discussion started by: bobprabhu
2 Replies

4. Shell Programming and Scripting

Issue with mail attachment

Hi Unix Gurus, Need your help regarding a weird issue that I'm facing. I have an automated unix script that sends out PGP encrypted reports/feeds to our users as mail attahments. Every thing has been going well and all the users have no issues except one, who instead of getting the attachment,... (1 Reply)
Discussion started by: arunsoman80
1 Replies

5. Solaris

Send mail issue.

Hi Gurus, I have moved one of my servers(Sol-9) to client site and have an issue trying to send mails from their site through SMTP server in my site. I get the below error when my server forwards mails to the SMTP server in another domain. root: mailx -v hari.ganesh@fnis.com Subject: test... (2 Replies)
Discussion started by: Hari_Ganesh
2 Replies

6. Red Hat

mail issue

Hi Friends, I wrote one shell script which will send some emails to the customers. I am using the "mail" command on the script to send the mails. As my hostname is "test.xxxx.com" and the username is "noreply", the sender address will become noreply@test.xxxx.com. As test.xxxx.com is not a... (2 Replies)
Discussion started by: arumon
2 Replies

7. Shell Programming and Scripting

issue in mail command

I have used the mail command from the command line for sending mail from one machine to anther machine. Example: mail -s "Test" thillaselvan@xxx.co.in Testing But the mail is not getting received. I have checked the logs in the following file. tail -f /var/log/exim4/mainlog It is... (0 Replies)
Discussion started by: thillai_selvan
0 Replies

8. Solaris

Server Mail Issue

Solaris server does not receive email from other servers any more. For example, If we send mail from server A to server B, mail is not reaching server B and there is no message or warning about failure of sending mail in server A. What may be the issue of this? Thankyou in advance!! (1 Reply)
Discussion started by: learner46
1 Replies

9. Shell Programming and Scripting

Mail sending issue

I have a script to run root commands on my server namely (alpha), If this commands run successfully I need to mail to myuser@domain.com I need the email to be from alpha@domain.com not from root@alpha.com, Is there a way to do this while I'm running the script as a root # cat myscript ... (2 Replies)
Discussion started by: Sara_84
2 Replies
Catalyst::View::Email(3pm)				User Contributed Perl Documentation				Catalyst::View::Email(3pm)

NAME
Catalyst::View::Email - Send Email from Catalyst SYNOPSIS
This module sends out emails from a stash key specified in the configuration settings. CONFIGURATION
WARNING: since version 0.10 the configuration options slightly changed! Use the helper to create your View: $ script/myapp_create.pl view Email Email In your app configuration: __PACKAGE__->config( 'View::Email' => { # Where to look in the stash for the email information. # 'email' is the default, so you don't have to specify it. stash_key => 'email', # Define the defaults for the mail default => { # Defines the default content type (mime type). Mandatory content_type => 'text/plain', # Defines the default charset for every MIME part with the # content type text. # According to RFC2049 a MIME part without a charset should # be treated as US-ASCII by the mail client. # If the charset is not set it won't be set for all MIME parts # without an overridden one. # Default: none charset => 'utf-8' }, # Setup how to send the email # all those options are passed directly to Email::Sender::Simple sender => { # if mailer doesn't start with Email::Sender::Simple::Transport::, # then this is prepended. mailer => 'SMTP', # mailer_args is passed directly into Email::Sender::Simple mailer_args => { Host => 'smtp.example.com', # defaults to localhost username => 'username', password => 'password', } } } ); NOTE ON SMTP
If you use SMTP and don't specify host, it will default to localhost and attempt delivery. This often means an email will sit in a queue and not be delivered. SENDING EMAIL
Sending email is just filling the stash and forwarding to the view: sub controller : Private { my ( $self, $c ) = @_; $c->stash->{email} = { to => 'jshirley@gmail.com', cc => 'abraxxa@cpan.org', bcc => join ',', qw/hidden@secret.com hidden2@foobar.com/, from => 'no-reply@foobar.com', subject => 'I am a Catalyst generated email', body => 'Body Body Body', }; $c->forward( $c->view('Email') ); } Alternatively you can use a more raw interface and specify the headers as an array reference like it is passed to Email::MIME::Creator. Note that you may also mix both syntaxes if you like ours better but need to specify additional header attributes. The attributes are appended to the header array reference without overwriting contained ones. $c->stash->{email} = { header => [ To => 'jshirley@gmail.com', Cc => 'abraxxa@cpan.org', Bcc => join ',', qw/hidden@secret.com hidden2@foobar.com/, From => 'no-reply@foobar.com', Subject => 'Note the capitalization differences', ], body => qq{Ain't got no body, and nobody cares.}, # Or, send parts parts => [ Email::MIME->create( attributes => { content_type => 'text/plain', disposition => 'attachment', charset => 'US-ASCII', }, body => qq{Got a body, but didn't get ahead.}, ) ], }; HANDLING ERRORS
If the email fails to send, the view will die (throw an exception). After your forward to the view, it is a good idea to check for errors: $c->forward( $c->view('Email') ); if ( scalar( @{ $c->error } ) ) { $c->error(0); # Reset the error condition if you need to $c->response->body('Oh noes!'); } else { $c->response->body('Email sent A-OK! (At least as far as we can tell)'); } USING TEMPLATES FOR EMAIL
Now, it's no fun to just send out email using plain strings. Take a look at Catalyst::View::Email::Template to see how you can use your favourite template engine to render the mail body. METHODS
new Validates the base config and creates the Email::Sender::Simple object for later use by process. process($c) The process method does the actual processing when the view is dispatched to. This method sets up the email parts and hands off to Email::Sender::Simple to handle the actual email delivery. setup_attributes($c, $attr) Merge attributes with the configured defaults. You can override this method to return a structure to pass into generate_message which subsequently passes the return value of this method to Email::MIME->create under the "attributes" key. generate_message($c, $attr) Generate a message part, which should be an Email::MIME object and return it. Takes the attributes, merges with the defaults as necessary and returns a message object. TROUBLESHOOTING
As with most things computer related, things break. Email even more so. Typically any errors are going to come from using SMTP as your sending method, which means that if you are having trouble the first place to look is at Email::Sender::Transport::SMTP. This module is just a wrapper for Email::Sender::Simple, so if you get an error on sending, it is likely from there anyway. If you are using SMTP and have troubles sending, whether it is authentication or a very bland "Can't send" message, make sure that you have Net::SMTP and, if applicable, Net::SMTP::SSL installed. It is very simple to check that you can connect via Net::SMTP, and if you do have sending errors the first thing to do is to write a simple script that attempts to connect. If it works, it is probably something in your configuration so double check there. If it doesn't, well, keep modifying the script and/or your mail server configuration until it does! SEE ALSO
Catalyst::View::Email::Template - Send fancy template emails with Cat Catalyst::Manual - The Catalyst Manual Catalyst::Manual::Cookbook - The Catalyst Cookbook AUTHORS
J. Shirley <jshirley@gmail.com> Alexander Hartmaier <abraxxa@cpan.org> CONTRIBUTORS
(Thanks!) Matt S Trout Daniel Westermann-Clark Simon Elliott <cpan@browsing.co.uk> Roman Filippov Lance Brown <lance@bearcircle.net> Devin Austin <dhoss@cpan.org> Chris Nehren <apeiron@cpan.org> COPYRIGHT
Copyright (c) 2007 - 2009 the Catalyst::View::Email "AUTHORS" and "CONTRIBUTORS" as listed above. LICENSE
This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2011-01-17 Catalyst::View::Email(3pm)
All times are GMT -4. The time now is 07:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy