|
Posted by John Drako on May 27, 2008, 11:54 am
Please log in for more thread options
Currently, I run postfix on my own server to send message from my site
(password requests, account activation notices and other messages).
I have phpMailer on the server and all the messages (currently about
1000 messages are sent daily) are sent by SMTP through postfix.
I'm contemplating moving this particular site's email to Gmail.
Is it possible to send mail through Gmail's servers with authentication
and everything?
|
|
Posted by Leigh Finch on May 27, 2008, 7:12 pm
Please log in for more thread options
John Drako wrote:
show/hide quoted text
> Currently, I run postfix on my own server to send message from my site
> (password requests, account activation notices and other messages).
> I have phpMailer on the server and all the messages (currently about
> 1000 messages are sent daily) are sent by SMTP through postfix.
>
> I'm contemplating moving this particular site's email to Gmail.
>
> Is it possible to send mail through Gmail's servers with authentication
> and everything?
>
Hi John,
According to
http://lifehacker.com/software/email-apps/how-to-use-gmail-as-your-smtp-server-111166.php gmail uses smtp over tls, with smtp authentication.
I would use pear mail, an basic guide is available here
http://www.phpmaniac.net/wiki/index.php/Pear_Mail but is does not cover
the authentication, or the use of smtp (as opposed to the mail() function).
iirc if you use smtp auth, the connection is automatically TLS.
You would want to use the smtp factory, with the following params:
$smtp_params["host"] = "smtp.gamil.com";
$smtp_params["port"] = "25";
$smtp_params["auth"] = true;
$smtp_params["username"] = "gmail_user@gmail.com";
$smtp_params["password"] = "gmail_password";
$mail_object =& Mail::factory("smtp", $smtp_params);
--
Hope this helps, Cheers
Leigh Finch
www.phpmaniac.net
|
|
Posted by AnrDaemon on May 27, 2008, 9:39 pm
Please log in for more thread options Greetings, John Drako.
In reply to Your message dated Tuesday, May 27, 2008, 19:54:06,
show/hide quoted text
> Currently, I run postfix on my own server to send message from my site
> (password requests, account activation notices and other messages).
> I have phpMailer on the server and all the messages (currently about
> 1000 messages are sent daily) are sent by SMTP through postfix.
show/hide quoted text
> I'm contemplating moving this particular site's email to Gmail.
What is the reason for that? May be there are other solutions?
If you need a particular address in "From"/"Reply-To" fields, you can just set
it and use it with your local postfix.
show/hide quoted text
> Is it possible to send mail through Gmail's servers with authentication
> and everything?
Ask phpMailer documentation. I don't know. I'm using mail() all the time and
it works flawlessly.
--
|
|
Posted by Jerry Stuckle on May 27, 2008, 9:49 pm
Please log in for more thread options John Drako wrote:
show/hide quoted text
> Currently, I run postfix on my own server to send message from my site
> (password requests, account activation notices and other messages).
> I have phpMailer on the server and all the messages (currently about
> 1000 messages are sent daily) are sent by SMTP through postfix.
>
> I'm contemplating moving this particular site's email to Gmail.
>
> Is it possible to send mail through Gmail's servers with authentication
> and everything?
>
Either Pear::Mail or phpmailer will do what you want. I happen to
prefer the latter, but that's only personal preference.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
|
|
Posted by Leigh Finch on May 27, 2008, 11:57 pm
Please log in for more thread options Jerry Stuckle wrote:
show/hide quoted text
> John Drako wrote:
>> Currently, I run postfix on my own server to send message from my site
>> (password requests, account activation notices and other messages).
>> I have phpMailer on the server and all the messages (currently about
>> 1000 messages are sent daily) are sent by SMTP through postfix.
>> I'm contemplating moving this particular site's email to Gmail.
>> Is it possible to send mail through Gmail's servers with
>> authentication and everything?
>
> Either Pear::Mail or phpmailer will do what you want. I happen to
> prefer the latter, but that's only personal preference.
>
I've setup a working example using Pear::Mail sending using gmail
available at
http://www.phpmaniac.net/wiki/index.php/Pear_Mail#Sending_using_SMTP if
you are interested.
--
Cheers,
Leigh Finch
|
| Similar Threads | Posted | | Authenticated SMTP Gateway | December 6, 2006, 7:13 pm |
| Not being able to send mails through PHP using SMTP | January 3, 2007, 1:14 pm |
| php module to send via SMTP? | November 2, 2007, 5:30 pm |
| Use external SMTP server (like google apps) to send email | January 9, 2008, 9:28 pm |
| Mail via SMTP | June 12, 2007, 2:16 pm |
| mail() on linux to use other smtp server | February 9, 2005, 6:03 pm |
| Non-local SMTP mail function. | October 4, 2006, 5:08 pm |
| Accessing SMTP direct instead of using mail() | June 3, 2008, 8:25 am |
| SMTP mail problem (but works OK in Outlook) | December 17, 2004, 1:43 am |
| mail - differentiate between smtp envelope to and header to? | June 29, 2005, 9:32 am |
|
> (password requests, account activation notices and other messages).
> I have phpMailer on the server and all the messages (currently about
> 1000 messages are sent daily) are sent by SMTP through postfix.
>
> I'm contemplating moving this particular site's email to Gmail.
>
> Is it possible to send mail through Gmail's servers with authentication
> and everything?
>