Page 1 of 1
Gmail for SMTP server
Posted: Sun Jun 08, 2008 10:20 pm
by YogaShop
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
Re: Gmail for SMTP server
Posted: Mon Jun 09, 2008 1:19 am
by calvis
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
Re: Gmail for SMTP server
Posted: Fri Jun 27, 2008 8:42 am
by m_plugables
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
If any one will try this please let me know weather it worked or not.
Re: Gmail for SMTP server
Posted: Fri Jun 27, 2008 11:29 am
by Logan Rhodehamel
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.
Re: Gmail for SMTP server
Posted: Sat Jun 28, 2008 2:08 am
by m_plugables
Logan, Thanks for confirmation
Re: Gmail for SMTP server
Posted: Sat Jun 28, 2008 3:04 am
by m_plugables
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
Provide some Email ID to which you want to send the test email in the
Send To text box and click the
Send button
Re: Gmail for SMTP server
Posted: Thu Oct 23, 2008 3:45 am
by sohaib
This one has been fixed already and will be part of 7.2.