Best Send Mail Option To Use

What are the differences and pros & cons between these 3 methods.

1. sendmail program

2. php mail function

3. smtp server

I do know what the smtp server method is, but Is one better or preferred over another?

As always, Thanks.

Php mail utilizes the built in 'mail' function within php. It will generally use the server's sendmail daemon to most likely do an SMTP request to the recipient's email server. So you can envision them to be like a stack. The likelihood of your email being flagged as spam is greatest using php mail, then sendmail, then smtp.

SMTP is authenticated (usually) and the others are not.

The differences are that the smtp "method" makes a direct SMTP connection to an email server for your domain. Sendmail and php mail will utilize whatever server configuration your hosting has provided and may not be appropriate for your domain.

Hope that helps explain...

Php mail utilizes the built in 'mail' function within php. It will generally use the server's sendmail daemon to most likely do an SMTP request to the recipient's email server. So you can envision them to be like a stack. The likelihood of your email being flagged as spam is greatest using php mail, then sendmail, then smtp.

SMTP is authenticated (usually) and the others are not.

The differences are that the smtp "method" makes a direct SMTP connection to an email server for your domain. Sendmail and php mail will utilize whatever server configuration your hosting has provided and may not be appropriate for your domain.

Hope that helps explain...

Thanks, that does explain a lot.

I have been using the sendmail for the longest time and it seems that lately when my customers sign up for newsletters and an auto reply sends out, it gets flagged for spam. I will try smtp and see how that goes.

I appreciate your input.