By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,750 Members | 1,367 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,750 IT Pros & Developers. It's quick & easy.

configuring Gmail smpt in php´

P: n/a
Is there any way to set up the php.ini file, in order to be able to use
gmail to send mails from a local machine?

I've tryied with

SMTP = smtp.gmail.com
smtp_port = 25

but I can't figure out where I've to write user and password data nor
the place where I've to write the SSL data which Gmail waits for...

regards - jm

Jan 11 '06 #1
Share this Question
Share on Google+
7 Replies


P: n/a
NC
julian_m wrote:

Is there any way to set up the php.ini file, in order to be able
to use gmail to send mails from a local machine?

I've tryied with

SMTP = smtp.gmail.com
smtp_port = 25

but I can't figure out where I've to write user and password data nor
the place where I've to write the SSL data which Gmail waits for...


Consider using phpMailer instead:

http://phpmailer.sf.net/

Cheers,
NC

Jan 11 '06 #2

P: n/a

NC wrote:
julian_m wrote:

Is there any way to set up the php.ini file, in order to be able
to use gmail to send mails from a local machine?

I've tryied with

SMTP = smtp.gmail.com
smtp_port = 25

but I can't figure out where I've to write user and password data nor
the place where I've to write the SSL data which Gmail waits for...


Consider using phpMailer instead:

http://phpmailer.sf.net/


Ahh, thanks, I'll give it a try

regards - jm

Jan 11 '06 #3

P: n/a
Hello,

on 01/11/2006 01:46 AM julian_m said the following:
Is there any way to set up the php.ini file, in order to be able to use
gmail to send mails from a local machine?

I've tryied with

SMTP = smtp.gmail.com
smtp_port = 25

but I can't figure out where I've to write user and password data nor
the place where I've to write the SSL data which Gmail waits for...


Not with the mail function under Linux/Unix systems.

You may want to try this MIME message class that comes with a wrapper
function named smtp_mail(). That function emulates the mail() function
but lets you send messages to a SMTP server of your choice and supports
authentication.

http://www.phpclasses.org/mimemessage
You also need this for SMTP delivery:

http://www.phpclasses.org/smtpclass

and this for authentication:

http://www.phpclasses.org/sasl
--

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
Jan 11 '06 #4

P: n/a

julian_m wrote:
NC wrote:
but I can't figure out where I've to write user and password data nor
the place where I've to write the SSL data which Gmail waits for...


Consider using phpMailer instead:

http://phpmailer.sf.net/


I can't get logged in. I'm receiving the following message:

Must issue a STARTTLS command first;
The following From address failed: my*******@gmail.com

Note that I already have

var $SMTPAuth = true;

Any kind of help would be apreciated
regards - jm

Jan 11 '06 #5

P: n/a

julian_m wrote:
julian_m wrote:
NC wrote:
> but I can't figure out where I've to write user and password data nor
> the place where I've to write the SSL data which Gmail waits for...

Consider using phpMailer instead:

http://phpmailer.sf.net/


I can't get logged in. I'm receiving the following message:

Must issue a STARTTLS command first;
The following From address failed: my*******@gmail.com

Note that I already have

var $SMTPAuth = true;

Any kind of help would be apreciated
regards - jm


mmm, i found an article in
https://noorul.nipl-silly-url-fixme....aintenance.php

"Even though phpmailer supports SMTP authentication, it lacks the
funtionality to use SSL connection. I couldn't use this class to
connect to gmail SMTP server because it requires SSL connection. The
only option left for me was to find out mail exchange servers of gmail
and interact with it. This is alright because my requirement is only to
send mail to a gmail account."

So PHPmailer can't be used to send mails trough gmail servers right?

regards - jm

Jan 11 '06 #6

P: n/a

julian_m wrote:
julian_m wrote:
NC wrote:
> but I can't figure out where I've to write user and password data nor
> the place where I've to write the SSL data which Gmail waits for...

Consider using phpMailer instead:

http://phpmailer.sf.net/


I can't get logged in. I'm receiving the following message:

Must issue a STARTTLS command first;
The following From address failed: my*******@gmail.com

Note that I already have

var $SMTPAuth = true;

Any kind of help would be apreciated
regards - jm


mmm, i found an article in
https://noorul.nipl-silly-url-fixme....aintenance.php

"Even though phpmailer supports SMTP authentication, it lacks the
funtionality to use SSL connection. I couldn't use this class to
connect to gmail SMTP server because it requires SSL connection. The
only option left for me was to find out mail exchange servers of gmail
and interact with it. This is alright because my requirement is only to
send mail to a gmail account."

So PHPmailer can't be used to send mails trough gmail servers right?

regards - jm

Jan 11 '06 #7

P: n/a
julian_m wrote:
Is there any way to set up the php.ini file, in order to be able to use
gmail to send mails from a local machine?

I've tryied with

SMTP = smtp.gmail.com
smtp_port = 25

but I can't figure out where I've to write user and password data nor
the place where I've to write the SSL data which Gmail waits for...

regards - jm


GMail doesn't use port 25, it's something else like 236... They use the
TLS protocol to authenticate, and so you need to write code which will
authenticate you before you can send outgoing mail through them. I
looked into that once upon a time, but could not figure it all out. I
gave up in the end, so I can't help you with a solution other than
telling you that you need to look into TLS, which i'm not sure that PHP
can handle... I could be wrong. Would love to see an update from you
if you figure this one out, though :)

John D. Mann
Jan 12 '06 #8

This discussion thread is closed

Replies have been disabled for this discussion.