Solved

Mailto Tag

Posted on 2004-08-27
4
637 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

724 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