Using Gmail for SMTP

Tagged:  

I use Google Apps on my domain(s) and was wondering how I use the SMTP for Gmail. I have it setup, according to my Gmail account settings, but nothing ever comes through when I post a message.

I have tried to use the regular PHP settings for email as well, but that isn't working, either.

Any help would be appreciated. Thank you.

Do you have access to your php.ini file? By default PHP's default email setting is to use sendmail.

Also check out this article:
http://lifehacker.com/software/email-apps/how-to-use-gmail-as-your-smtp-server-111166.php

I have my MX records pointing to Gmail servers and I think that is why the PHP sendmail isn't working (or at least that's all I can gather, right now).

I still can't get ProjectPier to send out updates, though and I have checked all the setting to make sure they are correct (even in the LifeHacker article).

Thanks for the help.

I'll keep looking.

In Gmail you have a couple of options.

Try this.

In the ProjectPier settings...

Set your mail transport to SMTP

SMTP server to whatever it is...

smtp.yourdomain.com (your dns is setup correctly i take it)

smtp port: 465 or 587 (gmail can use either - but not port 25)

It does require authentication. So choose Yes.

Enter your username - which is your complete email address.
Enter your password.

Finally, use secure SMTP connection. Choose yes.

Post your results after trying both smtp ports.

Todd nailed it. For mine, though, I used smtp.gmail.com as the SMTP server for it to work.

Hello,

I have projectpier running on a GoDaddy server. Using PHP to send mail works great, however I've tried Gmail and not working. Here is my setup:

Member user ID - name@domain.com

Configuration | Mailing

Mail Transport: SMTP Server
SMTP Server: smtp.gmail.com
Port: 587
Use SMTP Auth. : Yes
SMTP User: userid@gmail.com
SMTP Pass: areYouKidding
Use Secure SMTP: Yes, use TLS

however, it doesn't seems to work with SMTP, but okay with PHP.

any ideas?

I struggled with the issue of getting gmail to work as my smtp server before I finally got it working.

The above settings are correct except that you should use port 465 instead of 587. Don't ask me why. It didn't matter whether you select TLS or SSL but the port had to be 465.

As far as I know, 465 is for SSL and 587 is for TLS. Is there a bug here?

I'm also using gmail through google apps too. I'm using smpt port 587, and I've been able to send out mail with all secure smtp options (disabled; yes, use SSL; yes, use TLS).

It did seem like the test email got sent a few seconds faster on SSL as opposed to TLS, not that that matters though...

hi

by any chance would you know how to configure gmail through a mobile phone?

i followed the other instruction however it still doesn't want to send or receive e-mail.

what do i put on the smtp user ID and password?

Probably you shall check from product manual for mobile phone settings.

Hi,
i am unable to send mail by trying both ports,its giving mesgae as
notifier has failed to contruct mailer objcet.could you please fix this problem.
moreover my php script is as follows

Untitled Document

<?
// Please specify your Mail Server - Example: mail.yourdomain.com.
//ini_set("SMTP","131.127.167.78");

// Please specify an SMTP Number 25 and 8889 are valid SMTP Ports.
//ini_set("smtp_port","25");

// Please specify the return address to use
//ini_set('sendmail_from', 'Ramesh.Naga@Honeywell.com');

// The message
$message = "All the best";
$headers = 'From:ram.cdac87@gmail.com';
// In case any of our lines are larger than 70 characters, we should use wordwrap()
//$message = wordwrap($message, 70);

// Send

$i=mail('Ram.cdac87@gmail.com', 'My Subject', $message,$headers);
if($i)
echo "sucess";
else
echo "sorry";
?>

it give output as success

I am able to get google apps to work by setting the smtp server to:
ssl://smtp.googlemail.com

port: 465.

I have the same issue, did you found a solution?