MailMessage.From assigning problem.

  • Thread starter Thread starter philip.mckee
  • Start date Start date
P

philip.mckee

Hi has anyone come accross the problem....

THIS WORKS FINE
mail.From = "W-MyPcName.mycompany.com";
mail.To=strTo;
mail.Cc=strCC;
mail.Bcc=strBCC;
mail.Subject = strSubject;
mail.Body = strBody;

THIS DOES NOT WORK ????
string machine = Environment.MachineName + ".mycompany.com";
mail.From = machine ;
mail.To=strTo;
mail.Cc=strCC;
mail.Bcc=strBCC;
mail.Subject = strSubject;
mail.Body = strBody;

When you look at the the value in 'mail.From' on both of the above, the
EXACT same string is present.
Its got me, any help welcome :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top