views:

29

answers:

2

Hello all i got a mail code like this

body = "Dear " & cName & "," & vbcrlf & vbcrlf & "Your request for the " & vehHeader & " (" & FormatCurrency(vehPrice)& ")" & " has been received and will be reviewed promptly." & vbcrlf & "We will contact you shortly to verify your information." & vbcrlf & vbcrlf & "Thank you for using website"
AppSendMail AppSupportMailto, cEMail, "Confirmation of request...", body
AppReportError "CUBid.asp: Error sending confirmation e-mail."

so this sends an auto response to the customer but this just plain text would i be able to add a photo as an attacthment or is this ASP.NET code is to old? please let me know if you dont understand the code.

A: 

I think you're best bet would be to ensure your body was HTML and then just include an

<img src ="http://www.yourwebsite.com/yourimage.jpg" />

tag in it and link to an image thats located on your website. This way the size of the email is still small and you can format your email as you please.

cory.m.smith
+1  A: 

I've never heard of AppSendMail. Are you using a custom mail library?

If you use the standard .NET mail API (System.Net.Mail), you can easily add attachments and use Html format for the body in order to use rich text.

Here's a sample of attaching a file to an email using System.Net.Mail.MailMessage class:

http://msdn.microsoft.com/en-us/library/system.net.mail.mailmessage.attachments.aspx

KP
Would it be easier to send the photo as and html?
Silent
If you have a place to host the images then it may be easier to go that route, yes.
KP