04-29-2007
Hmmm....
I know this works when you type this in the command prompt..I can type my own body and its done..
My concern being the same cannot be reproduced if I put this in a script and want the body contents to be taken from a file
I have the contents in a file named text
And each time i execute the script sendmail should a send a mail with subject:testing and the contents from the file text
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
When I try to use mailx on AIX 5.2 I get the following message:
"The flags you gave make no sense since you're not sending mail."
The type of command sent is as follows:
mailx -s "Test" -c gilstanden@hotmail.com < sendmail.pid
but it just gives the message referenced previously.
Do I need to... (1 Reply)
Discussion started by: gstanden
1 Replies
2. Shell Programming and Scripting
Hi,
I have to use sendmail from command line, and we need to append a static string in subject to a new value from file.Is there any way to do it.
Thanks
Shrikrishna (1 Reply)
Discussion started by: shrikrishna
1 Replies
3. Red Hat
Dear All
how the root user i.e root@localhos.localdomain can be masqueraded in sendmail i want to masquerade the above to say test@test.com
Regards and thanks in advance (3 Replies)
Discussion started by: surfer24
3 Replies
4. Shell Programming and Scripting
Hi,
Can anyone kindly provide some information about how to populate the subject field of the email while using the sendmail utility ? Itried the following command line argument :
echo -e "Body of the email" | /usr/lib/sendmail -f from@from.com -t to@to.com -s " Subject of the email"
... (4 Replies)
Discussion started by: sdiptanil
4 Replies
5. UNIX for Dummies Questions & Answers
Hello All,
I am trying to send a file through email everyday from one of my Linux (x86_64) system. I've scheduled Sendmail in Crontab like this-
00 8 * * * /usr/sbin/sendmail name@xxx.co.uk < /home/file1.out
This entry in crontab is working very fine and I am receiving file file1.out... (10 Replies)
Discussion started by: NARESH1302
10 Replies
6. Solaris
I have sendmail enabled in my Solaris 10 boxes. It has being flagged as an violation to unix security standard as the port 25 is listening. I want to run the sendmail to run in non-daemon mode so that the queue is processed. Please help. (0 Replies)
Discussion started by: ranasarkar
0 Replies
7. AIX
How do I run sendmail in non-daemon mode in AIX (3 Replies)
Discussion started by: ranasarkar
3 Replies
8. UNIX for Advanced & Expert Users
Hello, I'm configuring sendmail on an AIX 7.1 server (bos.net.tcp.client 7.1.1.15).
I've gotten sendmail to send mail through our Novell GroupWise server, so that mail from a user on the server appears to come from their GroupWise account, and replies to the email would go to their GroupWise... (0 Replies)
Discussion started by: eyebeam
0 Replies
9. UNIX for Advanced & Expert Users
I am running SCO 5.0.6 and using sendmail 8.11.0 and having issues with smtp authentication. When trying to send mail the following message will kick back.
(reason: 530 5.7.1 Authentication required)
530 5.7.1 Authentication required
Not sure what needs to be tweeked in sendmail.cf but I... (1 Reply)
Discussion started by: ziggy6
1 Replies
10. Solaris
Hi all,
I have read about sendmail running as 2 separate process.
1 as a MSP, and the other as the real daemon or MTA.
In my current configuration,
the sendmail-client is disabled.
Both submit.cf and sendmail.cf are left as default untouch
I do not specified any mailhost... (3 Replies)
Discussion started by: javanoob
3 Replies
LEARN ABOUT PHP
imap_mail_compose
IMAP_MAIL_COMPOSE(3) 1 IMAP_MAIL_COMPOSE(3)
imap_mail_compose - Create a MIME message based on given envelope and body sections
SYNOPSIS
string imap_mail_compose (array $envelope, array $body)
DESCRIPTION
Create a MIME message based on the given $envelope and $body sections.
PARAMETERS
o $envelope
- An associative array of headers fields. Valid keys are: "remail", "return_path", "date", "from", "reply_to", "in_reply_to",
"subject", "to", "cc", "bcc", "message_id" and "custom_headers" (which contains associative array of other headers).
o $body
- An indexed array of bodies A body is an associative array which can consist of the following keys: "type", "encoding",
"charset", "type.parameters", "subtype", "id", "description", "disposition.type", "disposition", "contents.data", "lines", "bytes"
and "md5".
RETURN VALUES
Returns the MIME message.
EXAMPLES
Example #1
imap_mail_compose(3) example
<?php
$envelope["from"]= "joe@example.com";
$envelope["to"] = "foo@example.com";
$envelope["cc"] = "bar@example.com";
$part1["type"] = TYPEMULTIPART;
$part1["subtype"] = "mixed";
$filename = "/tmp/imap.c.gz";
$fp = fopen($filename, "r");
$contents = fread($fp, filesize($filename));
fclose($fp);
$part2["type"] = TYPEAPPLICATION;
$part2["encoding"] = ENCBINARY;
$part2["subtype"] = "octet-stream";
$part2["description"] = basename($filename);
$part2["contents.data"] = $contents;
$part3["type"] = TYPETEXT;
$part3["subtype"] = "plain";
$part3["description"] = "description3";
$part3["contents.data"] = "contents.data3
";
$body[1] = $part1;
$body[2] = $part2;
$body[3] = $part3;
echo nl2br(imap_mail_compose($envelope, $body));
?>
PHP Documentation Group IMAP_MAIL_COMPOSE(3)