Solved

Mailto Tag

Posted on 2004-08-27
4
627 Views
Last Modified: 2008-02-01
Is there a way to send an image with a mail to tag...

The idea is as follows... user enters in there email address, subject and a picture...

These details are stored in a database...

The Mailto Tag will then look something like
<Mailto:ResultVariable(0)Subject?<ResultVariable1>
I then want another <Result variable> which will send the image...possibly a link that will show in the main part of the email...
e.g www.mysite.com/<ResultVariable(3)>

hope this makes sense?

0
Comment
Question by:Kegan5
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 10

Expert Comment

by:rockmansattic
ID: 11912325
No, definitly not directly.   Mailto simply calls a javascript in the browser that opens a message with the default mail client.  

I suggest using php or asp to do this.  Check your ISP to see which (if either) youcan run.  Both are rather easy to setup, Plus mailto is not reliable.

Rockman
0
 
LVL 13

Expert Comment

by:flow79
ID: 11913131
If you have access to ASP, i great mail script (including attachment) is as follows:

preemail.asp ---------------------------------

<html>
<head>
<title>Untitled</title>

<style type="text/css">
<!--

body { font-size: xx-small; font-family: verdana; }
table { font-size: xx-small; }
input { width: 350px; border: 1px #999999 solid; }
textarea { width: 350px; height: 125px; border: 1px #999999 solid; }

-->
</style>

</head>
<body>

<%

Dim oConnA
Dim DB,DRIVER

Set oConnA=Server.CreateObject("ADODB.Connection")

oConnA.Open "DRIVER={Microsoft Access Driver (*.mdb)};" & "DBQ=\\coriolis\inetpub\wwwroot\CTC Plant Air Orders.mdb;"

Dim ReferenceID
ReferenceID = Request.QueryString("ReferenceID")

%>
<form method="get" action="email.asp">
<input type="hidden" value="<%= ReferenceID %>" name="ReferenceID">
<table summary="">
<tr>
<td><b>Enter the Receiving Email:</b></td>
<td>
      <input type="text" name="email"><br>
</td>
</tr>
<tr>
<td></td>
<td>To enter more than one email, simply put a<br> semicolon (;) between the addresses.</td>
</tr>
<tr>
<td valign="top"><b>Enter your Message:</b></td>
<td><textarea name="message"></textarea></td>
</tr>
<tr>
<td></td>
<td>
<b>Common HTML Codes:</b>
<table summary="">
<tr>
<td><b>Bold</b> &lt;b&gt;text&lt;/b&gt;</td>
<td><b>Underline</b> &lt;u&gt;text&lt;/u&gt;</td>
<td><b>Line Break</b> &lt;br&gt;</td>
</tr>
<tr>
<td><b>Italic</b> &lt;i&gt;&lt;/i&gt;</td>
<td colspan="2"><b>Link</b> &lt;a href="URL"&gt;link text&lt;/a&gt;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td></td>
<td>
<input type="submit" value="Submit">
</td>
</tr>
</table>
</form>

</body>
</html>



email.asp ----------------------------

<%

Dim ReferenceID
Dim Message
ReferenceID = Request.QueryString("ReferenceID")
Message = Request.QueryString("Message")
'** SUBROUTINE TO SEND EMAIL USING CDOSYS **

strMailBody = ""&Message&""

strTo=Request.QueryString("email")

' just fill in the appropriate values in From, yourSMTPserver, and yourattachment.extension
CALL SendMailCDOSYS("From", strTo, "Title", strMailBody, True, "yourSMTPserver","yourattachment.extension")



Sub SendMailCDOSYS(strFrom,strTO,strSubject,strMailBody,blnHTML,sMailServer,sAttachPath)
On Error Resume Next
     Dim objCDOConf,objCDOSYS
     ' ** CREATE THE E-MAIL SERVER OBJECT **
     Set objCDOSYS = Server.CreateObject("CDO.Message")
     Set objCDOConf = Server.CreateObject ("CDO.Configuration")

     ' ** SET AND UPDATE FIELDS PROPERTIES **
     With objCDOConf
          ' ** OUT GOING SMTP SERVER **
          .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = sMailServer
          ' ** SMTP PORT **
          .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport")  = 25
          ' ** CDO PORT **
          .Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
          ' ** TIMEOUT **
          .Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
          .Fields.Update
     End With

     ' ** UPDATE THE CDOSYS CONFIGURATION **
     Set objCDOSYS.Configuration = objCDOConf

     With objCDOSYS    
          ' ** WHO THE E-MAIL IS FROM **
          .From = strFrom

          ' ** WHO THE E-MAIL IS SENT TO **
          .To = strTo
                   
          ' ** THE SUBJECT OF THE E-MAIL **
          .Subject = strSubject
           
          ' ** SET THE E-MAIL BODY FORMAT (HTMLBody=HTML TextBody=Plain) **
          If blnHTML = True Then
          .HTMLBody = strMailBody
          Else
          .TextBody = strMailBody
          End If
               
               ' ** SET Attachments If any **
            If sAttachPath<>"" Then
            .AddAttachMent (sAttachPath)    
            End if
           
          ' ** SEND THE E-MAIL **
          .Send
     End with                    
       
     ' ** CLOSE THE SERVER MAIL OBJECT **
     Set objCDOSYS = Nothing
End Sub

Response.Redirect "yourpage.asp"

%>
0
 
LVL 4

Expert Comment

by:mrdilliard
ID: 12072050
you could send an image tag over the mailto, I believe...

<a href="mailto:someone@yoursite.com?body=<img src='http://www.squirreltweezers.com/images/yes.gif' />">Link here</a>

All that's going to do is make it link to the image on your site, but that would work, in theory.
0
 
LVL 4

Accepted Solution

by:
mrdilliard earned 30 total points
ID: 12072068
further clarification...

General form of a mailto a tag.

<a href="mailto:email@yoursite.com?subject=such and such&body=blah blah blah&cc=carbon copy!&bcc=blind carbon copy">Link</a>

I think that's everything you can do in a mailto tag...
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question