Help to configure SMTP on local PC for GMail
Posted by: TotalBalance (---.mho.net)
Date: June 05, 2007 01:11AM

I'm trying to setup SMTP on my local box to test mediawiki and wordpress email functionality. I use GMail as my SMTP mailserver.

Reading WAMP5 documentation, it looked like all I needed to do was modify [mail function] in the php.ini file.

Regardless which lines below are uncommented, I get the same error msg (this one is from the new user "Confirm e-mail address" mediawiki special page:

Mailer returned: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()

The above mailserver (localhost) and port (25) in the above example, vary depending on which of the below lines are uncommented.

To make sure I'm using active GMail SMTP mailservers, I use the below URL to find out GMail MX records:
[www.dnsstuff.com]

[mail function]
; For Win32 only.
;Below smtp obtained from GMail MX records
;select 1 SMTP line to uncomment for each test

;SMTP = smtp.gmail.com
;SMTP = gsmtp183.google.com
;SMTP = gsmtp163.google.com
;SMTP = gmail-smtp-in.l.google.com
;SMTP = alt1.gmail-smtp-in.l.google.com
;SMTP = alt2.gmail-smtp-in.l.google.com

;GMail recommends either port 465 or 587 - 465 is preferred
select 1 smtp_port line to uncomment for each test

;smtp_port = 465
;smtp_port = 587

;below does not change for each test
sendmail_from = username@gmail.com
SMTPAuth = true
Username = username@gmail.com
Password= xxxxxxxxxxxxx

Any suggestions what else I need to do to get GMail to work:

Thx. in advance,

Lars



Lars

Options: ReplyQuote
Re: Help to configure SMTP on local PC for GMail
Posted by: CyberSpatium (71.237.217.---)
Date: June 05, 2007 01:49AM

[lifehacker.com]


CyberSpatium
----------------------
WAMP English Forum Admin

Need help? Check out my WAMP User Manual/Guide here!


Cellular Phone Deals - The Best on the Net! - FREE PHONES! Take your pick from our featured cellular phone deals by Cingular, Verizon, T-Mobile, Sprint PCS, Nextel, and more! Most of our cellular phone offers include a FREE cellular phone with FREE shipping!


Web Development for Newbie's Blog - Check out my new blog. It is for web developers, and especially tailored for the web development newbie. If you are not fluent in “geek speak”, then this incredible resource is just you. And even if you are a web development pro, this is a great resource to check out some of the latest web development tips, news, tutorials, codes and more.


Mortgage and Home Loan Advice:
Clarify Loans

Options: ReplyQuote
Re: Help to configure SMTP on local PC for GMail
Posted by: TotalBalance (---.mho.net)
Date: June 05, 2007 02:04AM

Thx. CyberSpatium. Regrettably, the LifeHacker article is dated.

These days, for desktop email clients GMail can still use smtp.gmail.com but the port needs to be 465. This is the setting I presetnly use with Thunderbird and it works fine.

If your setting it up on a mobile phone gsmtp163.google.com and port 465 usually work. This is the setting I use with my Treo 650 email client and it works fine (although now I use the GMail mobile enhancements instead)

I've tried both of the above, along with the other configurations to make it work for my local WAMP5 server but none have done the trick. Are there any other settings in WAMP I need to modify or check?



Lars

Options: ReplyQuote
Re: Help to configure SMTP on local PC for GMail
Posted by: CyberSpatium (71.237.217.---)
Date: June 05, 2007 02:27AM

you need to download and install the wordpress plugin SMTP Plugin to use smtp servers for wordpress.
[wordpress.org]

you can not install mediawiki, it is not supported on windows


CyberSpatium
----------------------
WAMP English Forum Admin

Need help? Check out my WAMP User Manual/Guide here!


Cellular Phone Deals - The Best on the Net! - FREE PHONES! Take your pick from our featured cellular phone deals by Cingular, Verizon, T-Mobile, Sprint PCS, Nextel, and more! Most of our cellular phone offers include a FREE cellular phone with FREE shipping!


Web Development for Newbie's Blog - Check out my new blog. It is for web developers, and especially tailored for the web development newbie. If you are not fluent in “geek speak”, then this incredible resource is just you. And even if you are a web development pro, this is a great resource to check out some of the latest web development tips, news, tutorials, codes and more.


Mortgage and Home Loan Advice:
Clarify Loans

Options: ReplyQuote
Re: Help to configure SMTP on local PC for GMail
Posted by: TotalBalance (---.mho.net)
Date: June 05, 2007 03:28AM

Thanks for the follow up. Thanks for the wp extension link, I'll tryi it out for my WP blog.

FYI, using WAMP5 (newest version) mediawiki fine on my Windows XP box. As a matter of fact, the example given above was while trying to setup email verification on my local copy of mediawiki.

I've also go an update. From a suggestion over at the GMail forum, I modified the [mail function] to use the MX records from one of my Google Apps (http://google.com/a/) accounts vs. one of my gmail.com email accts..

Using the above URL to find out my Google apps domain email mx the new configuration became much simplier:

[mail function]
; For Win32 only.
;SMTP = localhost
;Google Apps email MX record
SMTP = ASPMX.L.GOOGLE.COM

smtp_port = 25
;Google Apps domain email
sendmail_from = [email address]

With this setup, SMTP from my local box works. There's just one small glitch that doesn't effect functionality but would be nice to learn how to fix. Here's the error msg. Although it implies email was not sent, it actually was and I was able to respond back with the confirmation email.

<quote> Could not send confirmation mail. Check address for invalid characters.

Mailer returned: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Denver' for '-6.0/DST' instead <quote>

Question:
It looks like there's a timezone setting I need to fix. Any ideas how to do this?

Thx.



Post Edited (06-05-07 03:49)

Lars

Options: ReplyQuote
Re: Help to configure SMTP on local PC for GMail
Posted by: CyberSpatium (71.237.217.---)
Date: June 06, 2007 12:06AM

there is no timezone setting for apache or php. they both use local time, which is your computers time.


CyberSpatium
----------------------
WAMP English Forum Admin

Need help? Check out my WAMP User Manual/Guide here!


Cellular Phone Deals - The Best on the Net! - FREE PHONES! Take your pick from our featured cellular phone deals by Cingular, Verizon, T-Mobile, Sprint PCS, Nextel, and more! Most of our cellular phone offers include a FREE cellular phone with FREE shipping!


Web Development for Newbie's Blog - Check out my new blog. It is for web developers, and especially tailored for the web development newbie. If you are not fluent in “geek speak”, then this incredible resource is just you. And even if you are a web development pro, this is a great resource to check out some of the latest web development tips, news, tutorials, codes and more.


Mortgage and Home Loan Advice:
Clarify Loans

Options: ReplyQuote
Re: Help to configure SMTP on local PC for GMail
Posted by: TotalBalance (---.mho.net)
Date: June 06, 2007 12:12AM

Thanks! I'll follow-up with mediawiki to get this resolved.

Great support forum BTW.



Lars

Options: ReplyQuote
Re: Help to configure SMTP on local PC for GMail
Posted by: TotalBalance (---.mho.net)
Date: June 06, 2007 09:02PM

CyberSpatium,

Just as an FYI, fixed the problem. From another forum here's what I found out:

Apparently, date/time support has been fully rewritten in PHP 5.1, and no longer uses the system settings to 'know' the timezone in operation. It will instead utilize, in the following order:

* The timezone set using the date_default_timezone_set() function (if any)
* The TZ environment variable (if non empty)
* The date.timezone ini option (if set)
* "magical" guess (if the operating system supports it)
* If none of the above options succeeds, UTC

To ensure accuracy (and avoid an E_STRICT warning), you will need to define your timezone in your php.ini using the following format:

date.timezone = Europe/London

The supported timezones are listed, in this format, in the PHP manual at [www.php.net].

Regards,

Lars



Lars

Options: ReplyQuote


Sorry, only registered users may post in this forum.