Skip to main content
Known Participant
April 8, 2013
Question

gmail smtp mail server verification

  • April 8, 2013
  • 2 replies
  • 12674 views

I have lately upgraded to CF10 from CF9.

Just lately I have noticed that I cannot get gmail smtp mail server verification within CFAdmin.

I am using the same settings as before.  In fact, on an old machine using CF9 I still get mail server verification.

MAIL SERVER: smtp.gmail.com

USERNAME: name@gmail.com

PASSWORD: xxxxxxxxxx

SERVER PORT 25

x  Enable SSL socket connections to mail server

Any insight would be greatly appreciated!

  wayne

    This topic has been closed for replies.

    2 replies

    Himansu Sekhar Khuntia
    Participating Frequently
    October 21, 2014

    Hello Wayne,

    If you haven't got the solution yet, give it a try.

    Allowing less secure apps to access your account in gmail (https://www.google.com/settings/security/lesssecureapps).

    Enabling access for less secure apps solved similar issue for me.(Make sure you don't have 2-Step Verification enabled for your accounts while allowing less secure apps to your account.)

    Thanks

    Himansu

    Known Participant
    October 22, 2014

    Himansu

    Thanks so much for looking further into this for me.

    I never did achieve success with my original problem, and I "solved" it when I upgraded to a new laptop just recently.

    I have found, on Windows 8.1, that using either Apache server or the stand alone ColdFusion server connects with the gmail  smtp mail server without much ado.

    I don't know very much about these problems, but I suspect that Windows IIS security was at the root of my problem before.

    Cheers, Wayne

    Himansu Sekhar Khuntia
    Participating Frequently
    October 23, 2014

    Thanks for the clarification Wayne.

    Regards Himansu

    Charlie Arehart
    Community Expert
    Community Expert
    April 13, 2013

    Is there any error in any of the CF logs, at the time you try that verification? It may give more details to help you understand the problem. (I have not tried verifying such a gmail connection myself.)

    /charlie

    /Charlie (troubleshooter, carehart. org)
    Known Participant
    April 13, 2013

    I went through all the logs but could find no relevant error at the time of verification.

    However, when I send a trial message from my form then this error can be found in mail.log

    "Error","scheduler-1","04/13/13","09:15:26",,"javax.mail.AuthenticationFailedException: 535 No SMTP server defined. Use real server address instead of 127.0.0.1 in your account. "

    I can assure you that I have set the mailserver/password etc to smtp.gmail.com

    I am using IIS as well though, and I notice that within its gui there is an SMTP email area.( I did play around with various option within here, but still could not connect and received the same error)

    Any help would be greatly appreciated!

    Wayne

    Charlie Arehart
    Community Expert
    Community Expert
    April 13, 2013

    Wayne, a few thoughts.

    First, you mention your CF9 being on an “old machine”. So this CF10 is on a new machine, right? Could it be a firewall issue perhaps? Got on the server (the CF10 one) and go to the Windows command prompt (Start>Run>cmd) and do:

    telnet smtp.gmail.com 25

    if that fails, then the problem is not CF.

    But let’s assume that may work. In that case, second, do note that the CF Admin mail setting sets a default, if you don’t set one on a CFMAIL tag in a page. You should find the CFML code for that form to locate the CFMAIL tag, and determine if it has its own SERVER attribute. If so, you need to change that to use gmail as well, then.

    Third, if you find that it does NOT have a SERVER attribute, then that page will indeed rely on the CF admin setting. And if you will still swear that it’s right, my only other thought is I wonder if you may have more than one instance of CF, and you configured the CF admin for one instance, but this code is running in the context of another. You can do a CFDUMP var=”#server#” to see what instance the request is running within.

    Let us know what you find.

    Finally, the existence of the optional IIS SMTP server is of no consequence here, if indeed you are telling CF to use gmail.

    /charlie

    /Charlie (troubleshooter, carehart. org)