Mail() Function to Remote Servers?

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
davidshq
Forum Newbie
Posts: 12
Joined: Mon May 05, 2008 10:47 pm
Location: Pennsylvania

Mail() Function to Remote Servers?

Post by davidshq »

I have sendmail installed on my LAMP server right now and it sends emails out okay...But its just one more thing to maintain, and I'd rather outsource my email server. Is there an easy way to have the PHP Mail() function instead of looking for sendmail grab a SMTP server and shoot off of that? e.g. If I have a Google Apps account and want to relay off their smtp servers?
Dave.
User avatar
infolock
DevNet Resident
Posts: 1708
Joined: Wed Sep 25, 2002 7:47 pm

Re: Mail() Function to Remote Servers?

Post by infolock »

i wouldn't recommend it, but you should be able to..

have a look at the smtp configuration options in your php.ini file

edit: also, here is a good tutorial
davidshq
Forum Newbie
Posts: 12
Joined: Mon May 05, 2008 10:47 pm
Location: Pennsylvania

Re: Mail() Function to Remote Servers?

Post by davidshq »

Any particular reasons you would recommend against?
Dave.
User avatar
infolock
DevNet Resident
Posts: 1708
Joined: Wed Sep 25, 2002 7:47 pm

Re: Mail() Function to Remote Servers?

Post by infolock »

If you are trying to use gmail as a relay agent for mail, i'm not so sure they will be so pleased. and depending on why you are doing this, you might be labeled a spammer in their eyes.

of course, i'm going to the extreme here, but i wouldn't want to take a chance of having my gmail account deleted ;)
Post Reply