P
Phil Mc
Hi has anyone come accross the problem....
with referance to System.Web.Mail.MailMessage and
System.Web.Mail.SmtpMail
THIS WORKS FINE
mail=new MailMessage();
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=new MailMessage();
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
The error message is as follows:
Error source: System.Web
Message: Could not access 'CDO.Message' object.
Stack: at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object
obj, String
methodName, Object[] args)
at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
at System.Web.Mail.SmtpMail.Send(MailMessage message)
at PCOMClassLibrary.SendMailMessage.SendMail() in
c:\dotnetwork\pcomclasslibr
ary\sendmailmessage.cs:line 101
with referance to System.Web.Mail.MailMessage and
System.Web.Mail.SmtpMail
THIS WORKS FINE
mail=new MailMessage();
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=new MailMessage();
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
The error message is as follows:
Error source: System.Web
Message: Could not access 'CDO.Message' object.
Stack: at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object
obj, String
methodName, Object[] args)
at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
at System.Web.Mail.SmtpMail.Send(MailMessage message)
at PCOMClassLibrary.SendMailMessage.SendMail() in
c:\dotnetwork\pcomclasslibr
ary\sendmailmessage.cs:line 101