Authenticating SMTP email when processing form

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

Post Reply
thall0515
Forum Newbie
Posts: 2
Joined: Tue Apr 03, 2012 10:27 am

Authenticating SMTP email when processing form

Post by thall0515 »

Hello all,

Having a bit of trouble figuring out how to get my online form to send properly.
Moved an entire website to a new webserver.
The old server had SMTP running on it with No Authentication required to send mail.

The new server is not running SMTP, so I need to be able to point to the mail server on the network and login (it requires authentication) to sen mail.
Here is what I have and where I am stuck in the code...

ini_set('SMTP', 'smtp.server.com');
ini_set('smtp_port', '25');
ini_set('username', user@domain.com');
ini_set('password', 'userpassword');

Thanks!
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Authenticating SMTP email when processing form

Post by Celauran »

Have you considered using SwiftMailer or PEAR's Mail package?
thall0515
Forum Newbie
Posts: 2
Joined: Tue Apr 03, 2012 10:27 am

Re: Authenticating SMTP email when processing form

Post by thall0515 »

No. I honestly have no experience using either and did not want to re-invent the wheel on this form.
Post Reply