473,396 Members | 1,865 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Is it possible to send mail through authenticated SMTP?

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?

Jun 2 '08 #1
7 2753
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?
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"] = "gm********@gmail.com";
$smtp_params["password"] = "gmail_password";

$mail_object =& Mail::factory("smtp", $smtp_params);

--
Hope this helps, Cheers
Leigh Finch
www.phpmaniac.net
Jun 2 '08 #2
Hello,

on 05/27/2008 12:54 PM John Drako said the following:
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/
Jun 2 '08 #3
Greetings, John Drako.
In reply to Your message dated Tuesday, May 27, 2008, 19:54:06,
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.
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.
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 <an*******@freemail.ru>

Jun 2 '08 #4
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.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jun 2 '08 #5
Jerry Stuckle wrote:
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....ing_using_SMTP if
you are interested.

--
Cheers,
Leigh Finch
Jun 2 '08 #6
On Tue, 27 May 2008 23:57:59 -0400, Leigh Finch wrote
(in article <zMSdnfC-CLXaRaHVnZ2dnUVZ_uCdnZ2d@internode>):
Jerry Stuckle wrote:
>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....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.

Jun 2 '08 #7
It is possible, however they will replace the from: address with the gmail
address associated with the gmail account.

Regards,
Daniel

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

Jul 1 '08 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Brad Tilley | last post by:
Anyone know of a small Python script that acts as a slimmed down smtp server (just sends from the local machine)? I currently use a smtp server for sending email reports from machines, but as...
6
by: erdem kemer | last post by:
i cant send mail to yahoo mail or hotmail while i can send my other mail accounts (pop3) is it becouse yahoo and hotmail is web-based mail here is the code MailMessage mailMsg = new...
6
by: John J. Hughes II | last post by:
I have a service that needs to send e-mail alerts. I have been attempting to use the System.Net.Mail function from .NET but this seems to require the IIS be installed and running. Since some of...
3
by: RN | last post by:
I am tired of sending mail from the built-in SMTP service for so many reasons (errors are nondescriptive in the event log, it doesn't let me control which IP address it sends from, and it...
14
by: supz | last post by:
Hi, I use the standard code given below to send an email from an ASP.NET web form. The code executes fine but no Email is sent. All emails get queued in the Inetpub mail queue. I'm using my...
8
by: Visual Systems AB \(Martin Arvidsson\) | last post by:
Hi! I am trying to send a Mail using SmtpClient on my developer computer. Is it not possible? Do i have to use it on a computer with IIS installed? If it is possible, what should i be...
2
by: Ruud Ortmans | last post by:
Hi, I developed an "Contact Us" - page with VS 2005 and ASP.NET 2.0. By clicking the send button the following code is executed: Configuration config =...
8
by: shapper | last post by:
Hello, I am trying to send an email using Asp.Net 2.0. I am getting the following error: System.Net.Mail.SmtpFailedRecipientException: Mailbox unavailable. The server response was: No such...
2
by: Bgreer5050 | last post by:
I posted a problem with sending email via smtp using Dot Net 2.0 I was told to look at adding authentication to my web.config file; I added the following: authenticationMode="SSL" I put...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.