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

Iftikar HussainRank #423 · 5.9K reputationPosted Aug 20, 2013, 9:51 PM EDT
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
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Aug 20, 2013, 9:51 PM EDT
for that you have to get the smtp address and port no. of spicejet then only you can send.
kritika RanaRank #7,001 · 251 reputationPosted Aug 20, 2013, 9:53 PM EDT
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 20, 2013, 9:54 PM EDT
kritika RanaRank #7,001 · 251 reputationPosted Aug 20, 2013, 9:54 PM EDT
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Aug 20, 2013, 9:55 PM EDT
kritika RanaRank #7,001 · 251 reputationPosted Aug 20, 2013, 9:59 PM EDT
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.
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 20, 2013, 10:00 PM EDT
Regards,
Iftikar
kritika RanaRank #7,001 · 251 reputationPosted Aug 20, 2013, 10:03 PM EDT
Thanks
Kritika
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 20, 2013, 10:04 PM EDT
http://wiki.sportingpulse.com/index.php/Find_your_Outgoing_Mail_Server_(SMTP)_Address
Regards,
Iftikar
Kunal VaishyaRank #990 · 2K reputationPosted Aug 20, 2013, 11:39 PM EDT