Scenario: We are using a createwizard control to create users for our website. When the user has an email we simply send the user the email with their username and password saying their account has been created. Using MailMessage and SMTPClient.
Problem: When the user doesn't have an email (ex. temp employee, student) I need to be able to generate the email but have it open via the creator's mail client so that they can enter in an email themselves/see the username and password. Similar to @mailto functionality.
Question: Is there a way to do this from the code behind? I have tried searching but everywhere is telling me to use MailMessage and SMTPClient which I don't need.
Thanks in advance.
You can create a mailto-link and click it with JavaScript.
See here: How do I programmatically click a link with javascript?
Or you can create a form with textboxes "To, Subject and Body", and a button send, where you wait 'till the user filled it out (the to field), then you send the mail with smtpclient.
On a sidenote: why not just prompt for an email address and then send it there ?