Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Mod: use smtp.gmail.com as mail server in WWF
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Mod: use smtp.gmail.com as mail server in WWF

 Post Reply Post Reply Page  12>
Author
StarDust View Drop Down
Senior Member
Senior Member


Joined: 14 May 2007
Location: Bangladesh
Status: Offline
Points: 310
Post Options Post Options   Thanks (0) Thanks(0)   Quote StarDust Quote  Post ReplyReply Direct Link To This Post Topic: Mod: use smtp.gmail.com as mail server in WWF
    Posted: 08 August 2007 at 7:14am
Problem

I have a Google App account for my domain name. I t is a free account that enables all my users to use POP mail service.

That is is has smtp also > smtp.gmail.com port: 465 or 587 (both, one at a time)

Please note: I have enabled POP in the no-reply@mydomain.com and using username
no-reply@mydomain.com and its password to send mail. But the WWF generates error:

Server Error in Forum Application
An error has occured while sending an email.
Please contact the forum administrator.

Support Error Code:- err_Access_send_mail_footer
File Name:- functions_send_mail.asp

Error details:-
jmail.SMTPMail
The message was undeliverable. All servers failed to receive the message




Here is what gmail says about configuration:

----------------------------

Configuring other mail clients

You can use the following information to configure POP with many mail clients. If you encounter difficulties, we suggest contacting your mail client's customer support department for further instructions -- we're not able to provide assistance with configuring mail clients not listed here.

Incoming Mail (POP3) Server - requires SSL: pop.gmail.com
Use SSL: Yes
Port: 995
Outgoing Mail (SMTP) Server - requires TLS: smtp.gmail.com (use authentication)
Use Authentication: Yes
Use STARTTLS: Yes (some clients call this SSL)
Port: 465 or 587
Account Name: your Gmail username (including @gmail.com)
Email Address: your full Gmail email address (username@gmail.com)
Password: your Gmail password

Please note that if your client does not support SMTP authentication, you won't be able to send mail through your client using your Gmail address.

--------------------------------



The Solution


This can be done with two lines of code :) Thanks to microsoft. This is a CDOSYS solution.

Open up functions_send_mail.asp and in line 193 you change the port number of gmail

Here is line 193

.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport")  = 25


Change the line into
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport")  = 465


or (Do you notice the change in port number?)
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport")  = 587


Before line 205 add this line:
.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True

Here is line 205:

.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60


Now all you need to do is select CDOSYS as your email component from admin panel.

And gmail's smtp is smtp.gmail.com port 465 or 587 requires username+password to authenticate.

Tested with WWF v9.02


Edited by StarDust - 08 August 2007 at 7:18am
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 08 August 2007 at 8:06am
I would not recommend using this method as it would require connection to an external SMTP server across the internet.

This will course serious delays when posting new posts while email notifications are sentout as a connection needs to be made each time across the internet which can be very slow.

You maybe fine on a small forum with a handful of users, but if your forum gets busy you will start getting long delays and timeouts.

Ideally you should use your own web hosts SMTP server which should be either local or on the same network, this would avoid these types of issues with using externally hosted SMTP servers.


Edited by -boRg- - 08 August 2007 at 8:08am
Back to Top
StarDust View Drop Down
Senior Member
Senior Member


Joined: 14 May 2007
Location: Bangladesh
Status: Offline
Points: 310
Post Options Post Options   Thanks (0) Thanks(0)   Quote StarDust Quote  Post ReplyReply Direct Link To This Post Posted: 08 August 2007 at 8:50am
Thank you -boRg- .


I understand what you suggest but i host my emails with google using google apps. This way, my mx is pointed to gmail and i must use gmail smtp else i would hv to use an smtp with another domain on my server.

This limitation forced me to use gmail.
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 08 August 2007 at 9:12am
Where your mx record or records point shouldn't make any difference to what SMTP server you use to send email for your site.

If you are worried about email bouncing back because it is being sent by a different SMTP server to that in your MX record, then setup an SPF record listing each of the SMTP servers used by your website.
Back to Top
StarDust View Drop Down
Senior Member
Senior Member


Joined: 14 May 2007
Location: Bangladesh
Status: Offline
Points: 310
Post Options Post Options   Thanks (0) Thanks(0)   Quote StarDust Quote  Post ReplyReply Direct Link To This Post Posted: 08 August 2007 at 9:18am
-boRg-,

That means if i use gmail for mydomain.com i need to set up an SPF for mydomain.com including smtpservers smtp.gmail.com and smtp.otherdomain.com?

This will solve the issue?
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 08 August 2007 at 9:23am
If you are worried about emails bouncing back then yes, setup an SPF record.

You should have a look at dnsstuff.com to checkout your DNS settings they will also give you a link to a good site to create an SPF record for your domain.

If you setup your own localhost SMTP server to relay on emails from your web site, then you need to ask your hosting company to setup reverse DNS for the server.

You can use an many SMTP servers are you like. This site uses 4 different SMTP servers setup to handle different types of mail and backup systems.


Edited by -boRg- - 08 August 2007 at 9:23am
Back to Top
StarDust View Drop Down
Senior Member
Senior Member


Joined: 14 May 2007
Location: Bangladesh
Status: Offline
Points: 310
Post Options Post Options   Thanks (0) Thanks(0)   Quote StarDust Quote  Post ReplyReply Direct Link To This Post Posted: 08 August 2007 at 9:30am
-boRg-

Thank You very much for the tip!

I am worried with my emails bouncing back. And also emails that are sent from website. It is better having another smtp for sending emails from website other than gmail. but i couldn't do that because i was worried about my emails getting bounced back. Now my problem will be solved :)

Thanks again!
Back to Top
pconline View Drop Down
Newbie
Newbie


Joined: 01 March 2009
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote pconline Quote  Post ReplyReply Direct Link To This Post Posted: 01 March 2009 at 8:06pm
Thanks you.
This is working great. Thanks again.
 
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.