Discussion Locked

automated email sending

0 helpful
13 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I want to send an email which is already written and addressed by simply clicking on the shortcut. I have the following:

mailto:person@hotmail.com?cc=test@hotmail.com?bcc=test@yahoo.com?subject=subject line?body=this is a test

This does everything I need except automatically send the email. What is the switch to automatically send the email or how may I send it without having to click on send

13 replies

by dave brown

The behavior you seek have to be a nonstandard extension to the mailto: URL format enabled by a specific email client. Quoting from RFC 2368 that describes the mailto URL: "[...] a mail client should never send a message based on a mailto URL without first showing the user the full message [...] and asking the user for approval[...]".

So, I think your only option would be to write a script on a server you control to take a query string similar to the mailto URL and send the mail. E.g., a formmail script.

If you must use the user's email client, you would have to be able to script that client. Unfortunately, many email-borne "worms" use such techniques and your implementing something similar might not be appreciated by your users.

by brothertech

This will not send the message automatically. Using the keyboard shortcut will execute the script but you must still click on send.

by aisp

I'd think the only way to "eliminate" the user from the process of sending an e-mail message is to process the "send mail click" on the server. For IIS, for example, this can relatively easy be implemented, using ASP. One idea is to respond to the "send mail click" by redirecting to an ASP page (say, mail.asp) which would send the message and then redirect back to the original page. The "mailto:" part can be replaced with the appropriate ...person name... tag or even by a button. The actual addressing and forming of subject and body would be handled in mail.asp. Responce.redirect "" in mail.asp would return the flow to the original page. Another approach is to use Visual InterDev 6 (VI6) to desing the "sending" page. Clicking on a DTC button (Design Time Control), for example, will be handled as a server-side event which you would code on the same page. I use the last approach in my web applications. VI6 also allows to improve the user interface and to hanle server-side sending of the e-mail message without the user actually noticing any "page swapping". Look also at http://support.microsoft.com/support/kb/articles/Q186/2/04.ASP for an MS KB Article ID:Q186204 "HOWTO: Use CDONTS to Collect and Mail Information From a User" for more details how to form and send an e-mail from ASP. I'm pretty sure a similar approach can be used on Unix using CGI and Perl, for example, but I'm more familiar with IIS.

This discussion is closed to new replies.