Can i use Gmail As SMTP?
I'm using Host as "smtp.gmailo.com";
port = 465;
but not result
I download CustomLogger from Ranorex website.
Gmail as SMTP
Re: Gmail as SMTP
I'm using this code to send mail
try
{
SmtpClient smtpClient = new SmtpClient();
smtpClient.Host = "smtp.gmail.com";
smtpClient.Port = 465;
smtpClient.Credentials = new NetworkCredential("My Email", "Mypassword");
smtpClient.EnableSsl = true;
smtpClient.Send(mail);
}
catch (Exception ex)
{
Console.Write(ex);
}
}
try
{
SmtpClient smtpClient = new SmtpClient();
smtpClient.Host = "smtp.gmail.com";
smtpClient.Port = 465;
smtpClient.Credentials = new NetworkCredential("My Email", "Mypassword");
smtpClient.EnableSsl = true;
smtpClient.Send(mail);
}
catch (Exception ex)
{
Console.Write(ex);
}
}
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Gmail as SMTP
Hello skhanpara,
Unfortunately we are not able to analyze what is causing your issue due to the lack of information.
May I ask you to provide your implemented custom logger class as well as the initialization of the class (which is usually done in the Program.cs) either via uploading the files to our forum or via mail ([email protected]).
Thank you in advance.
Regards,
Robert
Unfortunately we are not able to analyze what is causing your issue due to the lack of information.
May I ask you to provide your implemented custom logger class as well as the initialization of the class (which is usually done in the Program.cs) either via uploading the files to our forum or via mail ([email protected]).
Thank you in advance.
Regards,
Robert
Re: Gmail as SMTP
Thank for your reply
I am uploading a sample file i was trying to mail
I am uploading a sample file i was trying to mail
You do not have the required permissions to view the files attached to this post.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Gmail as SMTP
Hello skhanpara,
You need to use port 25 for your SMTP client.
Please find attached a solution with specified SMTP client for gmail.
Just modify:
within the MailLogger.cs
within the Program.cs
Regards,
Robert
You need to use port 25 for your SMTP client.
Please find attached a solution with specified SMTP client for gmail.
Just modify:
Code: Select all
System.Net.NetworkCredential basicCredential = new System.Net.NetworkCredential ("YourEmail", "YourPassword");
Code: Select all
MailLogger mailLogger = new MailLogger("From", "To",
"Ranorex Report for CustomLogging");
Regards,
Robert
You do not have the required permissions to view the files attached to this post.
Re: Gmail as SMTP
still i am not able to send
i made all the changes you told me
please advise
i made all the changes you told me
please advise
Re: Gmail as SMTP
Hello,
If you have a proxy, I think you must change your code. Google will help you
Hope this help
If you have a proxy, I think you must change your code. Google will help you

Hope this help
SW