We're using a very simple piece of code (at this stage) that allows us to send a simple (at this stage) e-mail to a contact.
We are making use of the following code :
MailMessage msg = new MailMessage();
msg.From = @"someone@somewhere.co.uk";
msg.To = @"someoneelse@somewhereelse.co.uk";
msg.Subject = @"Test message from C# Mailing";
msg.Body = @"This is the body of the text";
msg.BodyFormat = MailFormat.Text;
SmtpMail.SmtpServer = @"mailservername";
SmtpMail.Send(msg);
This works fine (as long as we set up the strings right).
And the intended target recieves the e-mail.
However ideally we would like to be able to then review the sent e-mail - in the sense that we can relocate it in the 'Sent Items' of our mail client (be it MS Outlook or Outlook Express).
How can we make this happen ?
Can we get the e-mail (we create through code) to actually be constructed and then opened in the e-mail client so that all the user has to do is check the message and hit the send button ?
Ideally this would make use of the e-mail client if it is already open, else it would need to open the e-mail client to prepare the message, allow it to be reviewed ready to be sent.
Furthermore would the code be the same for both MS Outlook and MS Outlook Express (as our clients tend to differ in their choice of mail client) ?
Any help would be appreciated,
Thanks in advance
Steve
We are making use of the following code :
MailMessage msg = new MailMessage();
msg.From = @"someone@somewhere.co.uk";
msg.To = @"someoneelse@somewhereelse.co.uk";
msg.Subject = @"Test message from C# Mailing";
msg.Body = @"This is the body of the text";
msg.BodyFormat = MailFormat.Text;
SmtpMail.SmtpServer = @"mailservername";
SmtpMail.Send(msg);
This works fine (as long as we set up the strings right).
And the intended target recieves the e-mail.
However ideally we would like to be able to then review the sent e-mail - in the sense that we can relocate it in the 'Sent Items' of our mail client (be it MS Outlook or Outlook Express).
How can we make this happen ?
Can we get the e-mail (we create through code) to actually be constructed and then opened in the e-mail client so that all the user has to do is check the message and hit the send button ?
Ideally this would make use of the e-mail client if it is already open, else it would need to open the e-mail client to prepare the message, allow it to be reviewed ready to be sent.
Furthermore would the code be the same for both MS Outlook and MS Outlook Express (as our clients tend to differ in their choice of mail client) ?
Any help would be appreciated,
Thanks in advance
Steve