corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Geek Day » PHP and sendmail


New Topic

New Poll
  Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author PHP and sendmail
ed
Member

Registered: 10th Sep 03
User status: Offline
5th Jun 06 at 13:52   View User's Profile U2U Member Reply With Quote

I have written a few scripts which send e-mails out for a few websites I'm working on at the moment. Is there any way I can change the name of the sender of the message, as currently the messages come through as the sendmaill default which is normally 'nobody' or 'www-data' which wont look very professional when I set the CRON up to automatically send out e-mails to the customers. I also need to be able to set message subjects too, as that is blank. I assume there are variable names that I need to know in order to do this?
Dom
Member

Registered: 13th Sep 03
User status: Offline
5th Jun 06 at 23:29   View User's Profile U2U Member Reply With Quote

if you use the mail function, you should beable to set the from sender address as well as subject. look at the php.net website and search for mail function, though something like:

ini_set(sendmail_from,'from@me.com');
mail($emailaddy, $subject, $body, $header);
ini_restore(sendmail_from);

should do the trick as it forces the sendmail_from parameter - been a long time since ive done php so its off the top of my head
Ian
Site Administrator

Avatar

Registered: 28th Aug 99
Location: Liverpool
User status: Offline
5th Jun 06 at 23:55   View Garage View User's Profile U2U Member Reply With Quote

Yes - mail() function has arguments.

See if you can get example 3 working.

http://uk2.php.net/manual/en/function.mail.php

[Edited on 05-06-2006 by Ian]

 
New Topic

New Poll

  Related Threads Author Forum Replies Views Last Post
bike vids for ppl who r bored Chris@Speedfreex General Chat 5 1473
9th Aug 03 at 21:43
by S.Nelson
 
New Virus DLLHost.exe blebo Geek Day 10 1929
20th Aug 03 at 11:47
by Mark Petty
 
good deal ? antonOO2 General Chat 4 782
7th Sep 03 at 12:44
by antonOO2
 
Interet techies! Macca_G Geek Day 3 954
9th Mar 04 at 14:48
by Macca_G
 
Few Pics from the Pod (56K Warning) PaulW General Chat 12 1058
21st Feb 05 at 16:40
by Jambo
 

Corsa Sport » Message Board » Off Day » Geek Day » PHP and sendmail 28 database queries in 0.0129042 seconds