Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you create an email message using the default email program?

Status
Not open for further replies.

dalchri

Programmer
Joined
Apr 19, 2002
Messages
608
Location
US
Whenever I click on a mailto: link on a website, an email message comes up in my default email program. This might be outlook, eudora, outlook express, netscape, or whatever I have installed. Some mailto links even have the subject filled in by default.

Is there anyway for me to access this sort of functionality from C#?

I need to be able to compose an email message with the following already filled in:

1) To
2) Subject
3) Body
4) File attachment

It will then be up to the user to modify and send the email once it is displayed. I also need to be able to compose and send the email without the user seeing any dialogs. It is mandatory that the email message be listed in the sent items folder for that user.

If I am not mistaken, using the System.Web.Mail namespace is out because the sent message would not appear in the sent items folder for the user's email program.

Is there a way to do this without resorting to a specific reference to the Outlook COM API?
 
first of all, to save an email in the sent folder of the default mail client you need client specific API because this is not done on the server. the mail server does not offer support to save the sent items so that the client can read it from there. it's a client built in function, which means there isn't a certain way of sending mail so that it is saved in the sent folder. therefore you will need an API for the client to save the email. other that that, you seem to have found the sollution.

--------------------------
"two wrongs don't make a right, but three lefts do" - the unknown sage
 
one more thing. if you use the mail client to send mails, if it's configured to save the emails in the sent items it will, otherwise, it won't.

--------------------------
"two wrongs don't make a right, but three lefts do" - the unknown sage
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top