-1

I'm working with a script that does a password reset function in a section of a page, when the user click the "Reset" button in the webpage it executes the "mailto" and appear a "new email" window of outlook,

how can I send a mail that includes some information of the webpage (like temporary password) in the body of the mail message and then send it?

The script I'm developing is with Selenium.

Nancy Cruz
  • 115
  • 1
  • 10
  • you can do this with a simple google search there are tons of examples use this as a starting base http://stackoverflow.com/questions/26403861/c-sharp-send-email-using-process-start – MethodMan Oct 05 '16 at 16:52
  • I don't want to create an new email object (window), I want to use the one that is already opened. The current Item, but don't worry I already found the answer https://social.msdn.microsoft.com/Forums/windows/en-US/8639b051-2b96-4210-bc80-f87fdc0b8c76/how-to-access-the-outlook-email-compose-message-body?forum=winforms – Nancy Cruz Oct 05 '16 at 17:05
  • Does your mailto link include the "body" parameter? – Dmitry Streblechenko Oct 05 '16 at 17:26

1 Answers1

0

The "mailto" command doesn't make any sense if you need to send the auto-generated email programmatically. Instead, I'd suggest developing any web-service for sending emails programmatically, so you can call it from a script without disturbing users.

Moreover, you can't be sure that all users have set the default email client to Outlook.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45