Cannot Send SMTP Email


Author
Message
Bill Cunnien
Bill Cunnien
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
I am stumped...here is my code:





MailMessage mMail = new System.Net.Mail.MailMessage();

mMail.Body = String.Format("Sales order ID {0} has been recently edited by {1}. The new order total {2:c} has increased which exceeds the previously approved amount of {3:c}.", mSalesOrder.orderid, AspireGlobals.CurrentUser.FullName, mSalesOrder.OrderTotal, _salesordertotal);

mMail.From = new MailAddress(AspireGlobals.CurrentUser.EmailAddress);

mMail.Subject = "Sales Order Exceeds Approved Total!";

mMail.To.Add(new MailAddress("bcunnien@spiratex.com"));

SmtpClient mSmtpClient = new SmtpClient("192.168.2.247");

mSmtpClient.UseDefaultCredentials = true;

try

{

mSmtpClient.Send(mMail);

}

catch (Exception ex)

{

MessageForm.ShowMessage("Aspire Information", String.Format("{0} :: {1} ({2})", ex.Message, ex.InnerException, ex.StackTrace), "Send Email", MicroFour.StrataFrame.Messaging.MessageFunction.OK, MicroFour.StrataFrame.Messaging.MessagingIcon.Information, MicroFour.StrataFrame.Messaging.MessagingSounds.Notify);

}





I get no error. No email is sent. The IP address is our Exchange server. Is there some credential's trick that I need to get SMTP traffic to flow through our Exchange server? I have tried other servers that have SMTP running, but none of them are sending an email, either. I can watch a connection being established in the Client Connections of the SMTP server via IIS...the connection persists until I actually close my application or it times out.



Anyone have any ideas about this one?



Thanks!!

Bill
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search