faqts : Computers : Programming : Languages : PHP : Common Problems : Email

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

4 of 11 people (36%) answered Yes
Recently 4 of 10 people (40%) answered Yes

Entry

How can I send email using mail function in linux. It always shows success if the syntax is correct.

Mar 28th, 2002 04:43
Deepak Kumar Vasudevan, deepa iyer, Ben Udall, General SMTP, PHP Documentation Pages and Google


Hi,
The mail function returns true on successful handing over of mail to 
the SMTP server. If there is an error in the same a error message like
'Server Error: Can not connect'
'Bad Message Destination' 
or a similar message. 
You can suppress these warning messages by prefixing @ to the function 
call like
@mail("deepak@deepak","test","test")
The actual result of the mail delivery is only after your SMTP server 
negotiates with the RCPT SMTP server. That your SMTP server will take 
care of. If you want to actually deal with real or fake email 
addresses, then you may need to open a socket connection to the SMTP 
server yourself and verify the same. You may appreciate an ASP 
equivalent of this at http://www.hexillion.com. They have a 
EmailDossier component for this. 
Deepak
http://deepak.portland.co.uk