Page 1 of 1

PHPs mail function not sending mail.

Posted: Sun Jan 14, 2007 11:54 am
by impulse()
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,

Posted: Sun Jan 14, 2007 12:05 pm
by feyd
If I had to guess, it would be improper settings and/or the mail server wants more headers.

Posted: Sun Jan 14, 2007 1:27 pm
by Chris Corbyn
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 :P

Posted: Sun Jan 14, 2007 1:32 pm
by impulse()
I didn't have Sendmail started. All's working fine now :)

What headers do you suggest sending? Formatting headers?

Posted: Sun Jan 14, 2007 1:37 pm
by Z3RO21
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.