Connecting Tech Pros Worldwide Forums | Help | Site Map

Is it possible to send mail through authenticated SMTP?

John Drako
Guest
 
Posts: n/a
#1: Jun 2 '08
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?


Manuel Lemos
Guest
 
Posts: n/a
#2: Jun 2 '08

re: Is it possible to send mail through authenticated SMTP?


Hello,

on 05/27/2008 12:54 PM John Drako said the following:
Quote:
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?

Sure. You may want to try this MIME message class that comes with a
sub-class specialized in SMTP deliveries that supports authentication
and TLS secure connections like Gmail requires.

http://www.phpclasses.org/mimeparser

You also need to use together this SMTP protocol class:

http://www.phpclasses.org/smtpclass

and this SASL class for authentication:

http://www.phpclasses.org/sasl


--

Regards,
Manuel Lemos

PHP professionals looking for PHP jobs
http://www.phpclasses.org/professionals/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
Leigh Finch
Guest
 
Posts: n/a
#3: Jun 2 '08

re: Is it possible to send mail through authenticated SMTP?


John Drako wrote:
Quote:
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...ver-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
John Drako
Guest
 
Posts: n/a
#4: Jun 2 '08

re: Is it possible to send mail through authenticated SMTP?


On Tue, 27 May 2008 23:57:59 -0400, Leigh Finch wrote
(in article <zMSdnfC-CLXaRaHVnZ2dnUVZ_uCdnZ2d@internode>):
Quote:
Jerry Stuckle wrote:
Quote:
>John Drako wrote:
Quote:
>>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....ing_using_SMTP if
you are interested.

Thanks to everybody for their answers.

I guess I should have looked at phpMailer sooner. I had an old version
on the server. When I checked I found version 2.0 which does exactly
what I need out of the box. Sometime the 'if it ain't broke don't fix
it' thing is not the optimum policy.

Leigh Finch
Guest
 
Posts: n/a
#5: Jun 2 '08

re: Is it possible to send mail through authenticated SMTP?


Jerry Stuckle wrote:
Quote:
John Drako wrote:
Quote:
>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....ing_using_SMTP if
you are interested.

--
Cheers,
Leigh Finch
Jerry Stuckle
Guest
 
Posts: n/a
#6: Jun 2 '08

re: Is it possible to send mail through authenticated SMTP?


John Drako wrote:
Quote:
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
==================
AnrDaemon
Guest
 
Posts: n/a
#7: Jun 2 '08

re: Is it possible to send mail through authenticated SMTP?


Greetings, John Drako.
In reply to Your message dated Tuesday, May 27, 2008, 19:54:06,
Quote:
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.
Quote:
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.
Quote:
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.


--
Sincerely Yours, AnrDaemon <anrdaemon@freemail.ru>

Daniel G
Guest
 
Posts: n/a
#8: Jul 1 '08

re: Is it possible to send mail through authenticated SMTP?


It is possible, however they will replace the from: address with the gmail
address associated with the gmail account.

Regards,
Daniel

"John Drako" <jbravo556@gmail.removethis.comwrote in message
news:g1haqu024v1@news5.newsguy.com...
Quote:
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?
>

Closed Thread