Here is the code:
'~~~~~~~~~~~ Send to Emails ~~~~~~~~~~~
If Len(Request.Form("submit1")) > 0 Then
'--|Send Clicked, Send E-mail
Dim oMail
Dim StrServerName
Dim StrTo
Dim StrFrom
Dim StrSubject
Dim StrBody
On Error Resume Next
Set oMail = Server.CreateObject("aspmailer.smtp")
'--|Trap for unregistered component
If Err.Number = -2147221005 Then
Response.Write "The component needs to be registered on the server!"
Response.End
End If
'--|Specify the SMTP server here (MAIL01)
StrServerName = "MAIL01"
'--|Check for null from in case you want a generic mailer account to send
email
If Len(Request("OrderConfEmail")) > 0 then
StrFrom = Trim(Request("OrderConfEmail"))
Else
StrFrom = "An*************@SomeDomain.com"
End If
StrTo = "Me@MyDomain.com"
CustName = "Modify an Existing Order for " & Trim(Request.Form("buyer"))
IF (Request("RNewUpdate") = "RNew") THEN
StrSubject = "New Order"
Else
StrSubject = "Update an Existing Order for #" & Request("UpdInvnum")
End If
'Format order sent via e-mail, i.e. bold the heading, etc.
H1 = "<b><font size=2 color=#ED171F face=Verdana, Arial, Helvetica,
sans-serif>Order Type:</font></b>"
StrBody = H1 + Request("ROrderComRes") + vbCrLf + _
"Closing Location: " + Request("RClosingLoc")
'--|Try to send it
bReturn = oMail.sendmail( StrServerName, StrTo, StrFrom, StrSubject,
StrBody )
If bReturn Then
Response.Write "<p><img border=0 src=images/logo2.gif width=291
height=47></p>" & _
"<p align=center><font size=4 color=#3C3C3C face=Arial, Helvetica,
sans-serif>Online Order Confirmation</font></p>" & _
"<hr color=#3B5C8D>" & _
"<p align=left><font size=3 color=#3C3C3C face=Arial, Helvetica,
sans-serif>Thank you for submitting your order with us. If the information"
& _
" we received is complete, your order shall receive immediate
attention.
</font></p>" & _
"<hr color=#3B5C8D><br>" & _
"<script lanquage=JavaScript src=footer.js>" & _
"</script>"
Else
'--|Show the error message also
Response.Write "<html><head><title>Error!</title></head><body>" & _
"There was a problem, Order was not sent!<br>" & _
oMail.status 'Show error
Response.Write "</body></html>"
End If
Set oMail = Nothing
Else
'--|Show Email form
%>
"John McDermidt" <jmcdt73_at_msn.com> wrote in message
news:OD****************@TK2MSFTNGP11.phx.gbl...
The relevant code would be where your ASP calls the object.
"JN" <Me@MyDomain.com> wrote in message
news:ux**************@tk2msftngp13.phx.gbl... I did post the relevent code. I am formatting it in the H1 assignment
then sending it.
"John McDermidt" <jmcdt73_at_msn.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl... Post your code? It looks like you are sending it as plain text ...
"JN" <Me@MyDomain.com> wrote in message
news:OF**************@TK2MSFTNGP11.phx.gbl...
> Hello,
>
> I use an ASP mail object to send orders filled online to a recipient
via an
> e-mail. I would like to know if it's possible to format the way the
order > looks in an e-mail? I tried the following, but see no change in the
format:
>
> H1 = "<b><font size=2 color=#ED171F face=Verdana, Arial, Helvetica,
> sans-serif>Order Type:</font></b>"
>
> StrBody = H1 + Request(OrderNum) + vbCrLf
>
> Then I get Order Type: just as plain as it would come if it didn't have any
> formatting.
>
> If I do the following:
>
> StrBody = "<b>Order Type:</b> + Request(OrderNum) + vbCrLf
>
> Then I get <b>OrderType:</b> as the heading.
>
> Does anyone know if it's possible to format the way the text look in an > e-mail that is sent using the ASP Mail Object? Is there a different way of > controlling the format/appearance of the text that appears in an
e-mail? >
> Thanks for your help.
>
>