Hi
I have some code which sends email to specified person using gmail account but I want to send it with some other account .How to configure the code with other account.
The code is as below:'
private void SendMail(string fileContent)
{
MailMessage mailMessage = new MailMessage();
mailMessage.From = new MailAddress("[email protected]", "Kritika");
// mailMessage.To.Add("[email protected]");
// mailMessage.To.Add("[email protected]");
mailMessage.To.Add("[email protected]");
mailMessage.Subject = "Test Email";
mailMessage.IsBodyHtml = true;
mailMessage.Body = fileContent + "
";
using (SmtpClient mailbox = new SmtpClient("smtp.gamil.com", 587))
{
mailbox.Credentials = new NetworkCredential("[email protected]", "paswd");
mailbox.EnableSsl = true;
mailbox.Send(mailMessage);
}
}
what has to written in place of highlighted text to send email from [email protected] to specified person.
Loading
Kunal VaishyaPosted Aug 21, 2013, 3:39 AM
Iftikar HussainPosted Aug 21, 2013, 2:04 AM
http://wiki.sportingpulse.com/index.php/Find_your_Outgoing_Mail_Server_(SMTP)_Address
Regards,
Iftikar
kritika RanaPosted Aug 21, 2013, 2:03 AM
Thanks
Kritika
Iftikar HussainPosted Aug 21, 2013, 2:00 AM
Regards,
Iftikar
kritika RanaPosted Aug 21, 2013, 1:59 AM
The code which you told me is configured with gmail . He will provide me the details which is required like smtp and port no.
You please let me know how to know smtp and port no.
Sanjeeb LenkaPosted Aug 21, 2013, 1:55 AM
kritika RanaPosted Aug 21, 2013, 1:54 AM
Iftikar HussainPosted Aug 21, 2013, 1:54 AM
kritika RanaPosted Aug 21, 2013, 1:53 AM
Sanjeeb LenkaPosted Aug 21, 2013, 1:51 AM
for that you have to get the smtp address and port no. of spicejet then only you can send.
Iftikar HussainPosted Aug 21, 2013, 1:51 AM
You need to SPICEJECT SMTP server details. I think that will be not possible for you to get it until unless you are doing project for them
Regards,
Iftikar