Jump to content


Photo

SMTP vs. mail()


  • Please log in to reply
6 replies to this topic

#1 rem

rem
  • Members
  • PipPipPip
  • Advanced Member
  • 42 posts

Posted 05 September 2006 - 04:26 PM

Hi,

I'm currently developing a PHP application and I was wondering about which method to send bulk emails to subscribers is better: SMTP or mail()?
I'm using phpmailer class and need this to work smoothly for large lists. Any advice? Thank you very much!

Regards,
Remus.

#2 ober

ober
  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 05 September 2006 - 04:36 PM

.... SMTP is the protocol.  mail() is a PHP function.  PHPMailer is a class.

Maybe you should understand what you're doing before you ask questions.

Info: PHP Manual


#3 rem

rem
  • Members
  • PipPipPip
  • Advanced Member
  • 42 posts

Posted 05 September 2006 - 04:46 PM

.... SMTP is the protocol.  mail() is a PHP function.  PHPMailer is a class.

Maybe you should understand what you're doing before you ask questions.


Ok, here's the thing: on phpmailer class, there's an option to either use the PHP mail() function, a SMTP server by providing an user and password if the server needs authentication or sendmail. I understand very well what am I doing, just need a professional's opinion on this matter on what's the better aproach:

Should I email subscribers by using the PHP mail() function or by using the SMTP server option of phpmailer since sendmail is not a viable option?

Thanks.

#4 ober

ober
  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 05 September 2006 - 05:23 PM

Well, do you have an IP address of the SMTP server?  I'd definatley go that route if you have the information.

Info: PHP Manual


#5 rem

rem
  • Members
  • PipPipPip
  • Advanced Member
  • 42 posts

Posted 05 September 2006 - 07:31 PM

Well, do you have an IP address of the SMTP server?  I'd definatley go that route if you have the information.

yes, i do have an IP address of the SMTP server, as well as host name, username and password. so, seems this would be the best choice, isn't it? i was only concerned about the slow response I get from the server when emails are sent... and I did tested it with just a few, what about when it'll be in production and more emails will be involved?

Thanks a lot, really appreciate it...


#6 steveclondon

steveclondon
  • Members
  • PipPipPip
  • Advanced Member
  • 161 posts

Posted 19 September 2006 - 04:04 PM

How have you got on with this. I to am wondering if I should use the mail() function or class to email my members when an advert is placed. This could be from a few hundred to several thousand.

Would like to know how you got on and what you decided to do and which class you have used.

#7 rem

rem
  • Members
  • PipPipPip
  • Advanced Member
  • 42 posts

Posted 19 September 2006 - 04:23 PM

How have you got on with this. I to am wondering if I should use the mail() function or class to email my members when an advert is placed. This could be from a few hundred to several thousand.

Would like to know how you got on and what you decided to do and which class you have used.


I finally decided to go with PHPMailer ( http://phpmailer.sourceforge.net/ ). It's very easy to work with and it had no issues using my SMTP server with. I heard this should be better than mail() function, don't know exactly why becasue I don't understand how a SMTP server is working, but decided to go with people smarter than I am :)

Good luck!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users