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
impulse()
Forum Regular
Posts: 748 Joined: Wed Aug 09, 2006 8:36 am
Location: Staffordshire, UK
Contact:
Post
by impulse() » Sun Jan 14, 2007 11:54 am
Can anyone spot a reason why the following code doesn't send an e-mail:
Code: Select all
mail("ste@stesbox.co.uk", "Quote - {$quoteFName} {$quoteCustID}",
"From address : {$quoteAddress1}\n{$quoteAddress2}\n{$quoteAddress3}\n
{$quoteAddress4}\n{$quoteAddress5}\n{$quoteAddress6}\n\n
To Address : {$quoteDelAddress1}\n{$quoteDelAddress2}\n{$quoteDelAddress3}\n
{$quoteDelAddress4}\n{$quoteDelAddress5}\n{$quoteDelAddress6}\n\n
Package Type : {$quotePackageType}\n\n
Height : {$quoteHeight}CM\n
Width : {$quoteWidth}CM\n
Length : {$quoteLength}CM\n\n
Pickup Date : {$quotePickupDay}/{$quotePickupMonth}/{$quotePickupYear}\n
Delivery Date: {$quoteDeliveryDay}/{$quoteDeliveryMonth}/{$quoteDeliveryYear}\n\n
Notes : {$quoteNotes}\n");
Regards,
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Sun Jan 14, 2007 12:05 pm
If I had to guess, it would be improper settings and/or the mail server wants more headers.
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098 Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia
Post
by Chris Corbyn » Sun Jan 14, 2007 1:27 pm
Windows or Linux server? \r\n if it's windows.
However, what does mail() return?
I'd suggest passing some extra headers too... mail() won't do that for you, although it will have a pretty good job at creating a nice mess
impulse()
Forum Regular
Posts: 748 Joined: Wed Aug 09, 2006 8:36 am
Location: Staffordshire, UK
Contact:
Post
by impulse() » Sun Jan 14, 2007 1:32 pm
I didn't have Sendmail started. All's working fine now
What headers do you suggest sending? Formatting headers?
Z3RO21
Forum Contributor
Posts: 130 Joined: Thu Aug 17, 2006 8:59 am
Post
by Z3RO21 » Sun Jan 14, 2007 1:37 pm
impulse() wrote: I didn't have Sendmail started. All's working fine now
What headers do you suggest sending? Formatting headers?
I love these simple errors, like when I was trying to use PHP5 in a PHP4 environment haha.