Print Page | Close Window

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

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums Modifications
Forum Description: Mod's and Add-on's for Web Wiz Forums.
URL: https://forums.webwiz.net/forum_posts.asp?TID=24104
Printed Date: 28 March 2026 at 5:43am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Mod: use smtp.gmail.com as mail server in WWF
Posted By: StarDust
Subject: Mod: use smtp.gmail.com as mail server in WWF
Date 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 http://mail.google.com/support/bin/answer.py?answer=12103&topic=1555 - 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


-------------
http://board.ebizbd.net/">Tips, mods and skins for WWF v9.x



Replies:
Posted By: WebWiz-Bruce
Date 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.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: StarDust
Date 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.


-------------
http://board.ebizbd.net/">Tips, mods and skins for WWF v9.x


Posted By: WebWiz-Bruce
Date 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.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: StarDust
Date 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?


-------------
http://board.ebizbd.net/">Tips, mods and skins for WWF v9.x


Posted By: WebWiz-Bruce
Date 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.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: StarDust
Date 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!


-------------
http://board.ebizbd.net/">Tips, mods and skins for WWF v9.x


Posted By: pconline
Date Posted: 01 March 2009 at 8:06pm
Thanks you.
This is working great. Thanks again.
 


Posted By: illyrianmoon
Date Posted: 05 February 2013 at 9:10pm
Thanks so much for this mod. It was very helpful!



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net