Gmail for SMTP server

Post feature requests to this forum and a pre-configured poll will automatically be created for you.
Post Reply

How important is this enhancement to you?

It's a critical enhancement that I must have.
3
60%
It's an important enhancement but others are more critical.
0
No votes
I'd like to have it but it's not that important.
1
20%
I'd never use this feature.
1
20%
 
Total votes: 5

YogaShop
Ensign (ENS)
Ensign (ENS)
Posts: 5
Joined: Mon Apr 21, 2008 4:38 pm

Gmail for SMTP server

Post by YogaShop » Sun Jun 08, 2008 10:20 pm

I am trying to use Gmail for SMTP server I receive and error.

The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first. j34sm11922467waf.48


Please let me know where is the code page for SMTP setup so I can modify.


-Cash

User avatar
calvis
Rear Admiral (RADM)
Rear Admiral (RADM)
Posts: 710
Joined: Tue Jan 27, 2004 3:57 pm
Location: Redmond, WA

Re: Gmail for SMTP server

Post by calvis » Mon Jun 09, 2008 1:19 am

I would like to see this added as well. Here is my thread for the request:

viewtopic.php?f=45&t=6836&p=28230&hilit=gmail#p28230
Able Customer Since 1999 Currently Running on GOLD R12 SR1 and PCI Certified.

User avatar
m_plugables
Commander (CMDR)
Commander (CMDR)
Posts: 149
Joined: Tue Mar 11, 2008 12:44 am
Contact:

Re: Gmail for SMTP server

Post by m_plugables » Fri Jun 27, 2008 8:42 am

I have checked the Admin/Store/EmailTemplates/SmtpSettingsDialog.ascx user control file. I think in order to use gmail we must have to tell that SSL is enabled. But i haven't found any setting for this purpose in SmtpSettings and EmailClient. I have made some searches and find that ASP.NET 2.0 uses System.Net.Mail.SmtpClient for sending Emails and also support a property for Enabling SSL. If any one of you people have the CommerceBuilder API source code then you should check CommerceBuilder.Messaging.EmailClient class Send method. And if it is using some object of type System.Net.Mail.SmtpClient then try to Enable the SSL for that object. For example if there is an object of type System.Net.Mail.SmtpClient
having name smtpc then just do the following just above the smtpc.Send
statement

Code: Select all

smtpc.EnableSsl = true;
If any one will try this please let me know weather it worked or not.
Image
Visit the links below to Download Plugins for your AC7 Store
http://www.plugables.com
http://blog.plugables.com

User avatar
Logan Rhodehamel
Developer
Developer
Posts: 4116
Joined: Wed Dec 10, 2003 5:26 pm

Re: Gmail for SMTP server

Post by Logan Rhodehamel » Fri Jun 27, 2008 11:29 am

Well I can confirm we are using the System.Net.Mail.SmtpClient class. Tell you what, here's an approximation of the code that sends the messages. Someone who has Gmail / SMTP and wants this feature, tell me what you have to do to the code to make it work (i.e. try mazhar's suggestion). I will create an enhancment request in bugzilla with the info.

Code: Select all

        public static void Send(System.Net.Mail.MailMessage mailMessage, CommerceBuilder.Messaging.SmtpSettings smtpSettings)
        {
            SmtpClient smtpClient = new SmtpClient(smtpSettings.Server, smtpSettings.Port);
            if (smtpSettings.RequiresAuthentication)
            {
                smtpClient.Credentials = new System.Net.NetworkCredential(smtpSettings.UserName, smtpSettings.Password);
            }
            //SEND THE MAIL MESSAGE
            smtpClient.Send(mailMessage);
        }
You should be able to create a dummy test file that uses the code above and sends a message to your server. Then see whether enabling SSL is all that is required to make it send through Gmail. If so, we could add another option on the SMTP settings configuration.
Cheers,
Logan
Image.com

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.

User avatar
m_plugables
Commander (CMDR)
Commander (CMDR)
Posts: 149
Joined: Tue Mar 11, 2008 12:44 am
Contact:

Re: Gmail for SMTP server

Post by m_plugables » Sat Jun 28, 2008 2:08 am

Logan, Thanks for confirmation
Image
Visit the links below to Download Plugins for your AC7 Store
http://www.plugables.com
http://blog.plugables.com

User avatar
m_plugables
Commander (CMDR)
Commander (CMDR)
Posts: 149
Joined: Tue Mar 11, 2008 12:44 am
Contact:

Re: Gmail for SMTP server

Post by m_plugables » Sat Jun 28, 2008 3:04 am

You should be able to create a dummy test file that uses the code above and sends a message to your server. Then see whether enabling SSL is all that is required to make it send through Gmail. If so, we could add another option on the SMTP settings configuration.
I have created a dummy test file and its working for my local store.

On the Configure -> Email -> Settings dialog adjust the settings as bellow

Code: Select all

Server: smtp.gmail.com
Port   : 587
Requires Authentication: true
User Name: Your valid GMail account Id
Password  : Your GMail account password
Now i have attached a sample user control for sending a test Email. Just place it in the ConbLib and Use it in some scriptlet on store side like on the Home Page content scriptlet

Code: Select all

[[ConLib:EmailTest]]
Provide some Email ID to which you want to send the test email in the Send To text box and click the Send button
Image
Visit the links below to Download Plugins for your AC7 Store
http://www.plugables.com
http://blog.plugables.com

User avatar
sohaib
Developer
Developer
Posts: 1079
Joined: Fri Jan 23, 2004 1:38 am

Re: Gmail for SMTP server

Post by sohaib » Thu Oct 23, 2008 3:45 am

This one has been fixed already and will be part of 7.2.

Post Reply