I need to send an email with the application. No problem if I do it myself, but ...
Inside the company I work for, I need to go through a web service that expects email and bodies.
I know that the implementation of this service uses System.Web.mail.Mailmessage, perhaps something like this:
MailMessage mm = new MailMessage();
mm.to = email_;
mm.body = body_;
...
So, is there a way to create a string that will contain my binding so that I can send it to the web service?
THX
- Edition-- I have to use the "TheCompanyMail" class, which has 2 properties (to, body) and one method (send). This class is a proxy for the web service. This web service is the one that really sends mail. The problem is that I need to add an attachment to the mail and really don't know how to do it.
Example
File f = MyFuturAttachementFile;
TheComapyMail m = new TheCompanyMail();
m.to = "myCustomer@Company.com"
m.body = "Here is the file you're waiting for:"+f.ToString(); //this of course doesn't work !!!
m.send();
So, I am wondering if I can format the string of the body property to add an attachment?
source
share