469,271 Members | 1,787 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

Format E-mail

JN
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.
Jul 19 '05 #1
11 2822
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.

Jul 19 '05 #2
This article details ways to send HTML formatted e-mail.

http://www.aspfaq.com/2295

"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.

Jul 19 '05 #3
What object are you using? CDO? CDONTS? Some third party object?

Ray at home

"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.

Jul 19 '05 #4
JN
It's a 3rd party object, VB DLL on backend creating a Mail Object via an ASP
page.
"Ray at <%=sLocation%>" <as*@me.forit> wrote in message
news:ul**************@TK2MSFTNGP10.phx.gbl...
What object are you using? CDO? CDONTS? Some third party object?

Ray at home

"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.


Jul 19 '05 #5
JN
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.


Jul 19 '05 #6
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.



Jul 19 '05 #7
> I did post the relevent code.

No, you didn't.
Jul 19 '05 #8
> It's a 3rd party object,

WHICH ONE? There are only about 100 3rd party e-mail com objects...
Jul 19 '05 #9
The name of it? Did you check the documentation for it?

Ray at work

"JN" <Me@MyDomain.com> wrote in message
news:OH**************@TK2MSFTNGP10.phx.gbl...
It's a 3rd party object, VB DLL on backend creating a Mail Object via an ASP page.

Jul 19 '05 #10
JN
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.
>
>



Jul 19 '05 #11
JN
There was no documentation, as I got this via a subscription with a
developer resource site. They are undergoing re-construction so I can't find
the same application again. There only were comments in the application,
which doesn't say anything about HTML format or formatting the e-mails.
Perhaps, I could modify the VB project/dll and add a htmlbody property.

Thanks.

"Ray at <%=sLocation%>" <as*@me.forit> wrote in message
news:%2******************@TK2MSFTNGP10.phx.gbl...
Did you check the documentation for this aspmailer.smtp object to see if
there is an htmlbody property you have to set or something along those
lines?

Ray at work

"JN" <Me@MyDomain.com> wrote in message
news:uD**************@TK2MSFTNGP11.phx.gbl...
Here is the code:

'~~~~~~~~~~~ Send to Emails ~~~~~~~~~~~


Set oMail = Server.CreateObject("aspmailer.smtp")


Jul 19 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Lowell Kirsh | last post: by
15 posts views Thread by Simon Brooke | last post: by
3 posts views Thread by stevek | last post: by
6 posts views Thread by Dario Di Bella | last post: by
11 posts views Thread by Grumble | last post: by
7 posts views Thread by Alpha | last post: by
4 posts views Thread by David Morris | last post: by
13 posts views Thread by Roy | last post: by
3 posts views Thread by Carl Trachte | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.