Hello,
I have problems with encoding when sending mail using mailmessage object. it shows characters: ????
here is code:
public static bool SendEmail(MailMessage Message)
{
SmtpSection smtpSec = (SmtpSection)ConfigurationManager.GetSection("system.net/mailSettings/smtp");
// Smtp configuration
SmtpClient smtpSender = new SmtpClient(smtpSec.Network.Host, smtpSec.Network.Port);
smtpSender.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;
smtpSender.Credentials = new System.Net.NetworkCredential(smtpSec.Network.UserName, smtpSec.Network.Password);
//smtpSender.EnableSsl = true;
Message.BodyEncoding = System.Text.Encoding.GetEncoding("windows-1255"); // this is won't help...
try { smtpSender.Send(Message); }
catch (SmtpException ex) { return f ...
Go to the complete details ...