Skip to main content
Home Forums Silverlight Programming Programming with JavaScript mailto and attachments
3 replies. Latest Post by party42 on October 7, 2008.
(0)
nirlevin
Member
40 points
121 Posts
10-07-2008 7:45 AM |
Using System.Mail letting me send mail with attachment but it is sent from my email address.
I want to have the ability in my Silverlight application to send mail by the name of the client.
I know how to call JS function with mailto method. This will open the client default mail application as I want.
The problem is that this technique does not support attachment adding (mailto:....&attachement=.. not works for some mail application such as Outlook).
Does someone have an idea?
party42
Participant
1102 points
338 Posts
10-07-2008 8:02 AM |
well, create a standard form in which you ask for the clients emailaddress and put that in the "to" line. you're only using your own smtp server for distribution and thats not really a bad thing. Though you'd probably want to protect it to prevent it from becoming a relay server (aka spam server.. ).
10-07-2008 9:36 AM |
I want the mail to be sent by the name of the user and not by my name.
I don't want the 'From' field to display mymail but the user mail.
Some of the reasons is the one you suggested - user can also send spam.
When clicking on image in the browser, there is option in the popup menu - email this picture.
This option open user's default mail application, with new mail, where the 'From' field is the user mail.
I want to do the same using Silverlight\Javascript.
10-07-2008 10:16 AM |
aight, so what you could do is set the content of the email message to include the url (hyperlink) to the image. As you mentioned, you cant set an attachment from outside (think of the security risk involved).
Using the mailto tag will open up your default email program (usually Microsoft Outlook for Windows). One downside of using mailto is that people with no email program configured (ie when not sitting behind its own computer) will render this program useless. They will just get an error message. You can signup for free form mailers online. An example would be http://freedback.com/. You can signup for their service and then copy the code into your page. You'll have a form running in no time.