Wont send right

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
pinehead18
Forum Contributor
Posts: 329
Joined: Thu Jul 31, 2003 9:20 pm

Wont send right

Post by pinehead18 »

mail ($email, "Your account information at ", $body, "FROM:
support@l.com");

This code says the mail is from nobody@mydomain.com yet i tell it what email it is from.

Any ideas?
Thanks
Anthony
Steveo31
Forum Contributor
Posts: 416
Joined: Sun Nov 23, 2003 9:05 pm
Location: San Jose CA

Post by Steveo31 »

Open the php.ini file and look for the sendmail_from line. Change it there.
User avatar
launchcode
Forum Contributor
Posts: 401
Joined: Tue May 11, 2004 7:32 pm
Location: UK
Contact:

Post by launchcode »

FROM: should be lower-case, like:

"From: whoever@wherever.com" and it does make a difference. Also check a phpinfo() dump to see if you can actually send mail or not.

Cheers,

Rich
pinehead18
Forum Contributor
Posts: 329
Joined: Thu Jul 31, 2003 9:20 pm

Post by pinehead18 »

Well it was working fine, but when i changed the email address it stopped working.

Other parts of the site with mail
are working..
User avatar
patrikG
DevNet Master
Posts: 4235
Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK

Re: Wont send right

Post by patrikG »

pinehead18 wrote:mail ($email, "Your account information at ", $body, "FROM:
support@l.com");

This code says the mail is from nobody@mydomain.com yet i tell it what email it is from.

Any ideas?
Thanks
Anthony
Change the sender to support@myTopLevelDomain.com - a one letter Top Level Domain is invalid and, if I remember correctly, PHP checks that since a couple of releases.
pinehead18
Forum Contributor
Posts: 329
Joined: Thu Jul 31, 2003 9:20 pm

Post by pinehead18 »

Well the problem with that is, it was support@mywebsite.com however, i changed it to one letter cuase i didn't want to display it.

Any other suggestions?
User avatar
launchcode
Forum Contributor
Posts: 401
Joined: Tue May 11, 2004 7:32 pm
Location: UK
Contact:

Post by launchcode »

Why would you want to hide the From address? Is this some kind of spam script or something?
Post Reply