Hello,
Kevin it's right, the code to send an e-mail is sent in the server side.
Maybe there has been some changes on your SMTP server, or there is some
security restriction with the ASPNET user that runs under IIS.
I would try:
- First check if you really can send an e-mail from the server machine
now (not using .net code, using telnet, you can find this a link below).
- If you can send an e-mail using that user and password, now let's try
with the ASP .net accessing from your localhost, if you cannot try in the IIS
to use a different account (just something temporary) to ensure that is not a
permission issue.
- I would check as well if there is some restriction or rules on the SMTP
server where you rely, sometimes for instance the from must have a given a
domain name, or you shoulw login using Basic Authentication or NTLM.
More info about .net framework support to SMTP:
http://www.tipsdotnet.com/ArticleBlo...TP&PageIndex=0
Good luck
Braulio
/// ------------------------------
/// Braulio Diez
///
///
http://www.tipsdotnet.com
/// ------------------------------
"Mike" wrote:
Hi,
I'm using this code for sending emails and its working fine because I had
configured SMTP in my machine in IIS.
now I'm using machine as a server for this application. but when running the
same application from other machine the email process is not working.
so, do I have to configure and install SMTP in all client machine to get it
working!? or should it be enough just to set it in the server machine?
MailMessage objMailMsg = new MailMessage(strFrom, strTo);
objMailMsg.BodyEncoding = Encoding.UTF8;
objMailMsg.Subject = strSubject;
objMailMsg.Body = strMsg;
Attachment at = new Attachment(Server.MapPath(AttachmentPath));
objMailMsg.Attachments.Add(at);
objMailMsg.Priority = MailPriority.High;
objMailMsg.IsBodyHtml = true;
//prepare to send mail via SMTP transport
SmtpClient objSMTPClient = new SmtpClient();
objSMTPClient.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis;
objSMTPClient.Send(objMailMsg);
Thanks
--
Regards,
M.Rochdi