473,398 Members | 2,525 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

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 3009
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Lowell Kirsh | last post by:
In Peter Norvig's Infrequently Answered Questions he explains that the following 2 fnctions look almost identical but are not the same: def printf(format, *args): print format % args, def...
15
by: Simon Brooke | last post by:
I'm investigating a bug a customer has reported in our database abstraction layer, and it's making me very unhappy. Brief summary: I have a database abstraction layer which is intended to...
3
by: stevek | last post by:
How do I format an integer. Add commas. 1234565 1,234,565 TIA
6
by: Dario Di Bella | last post by:
Hi all, we have the following urgent issue affecting our development team. Initially we had one particular workstation that failed executing queries on a DB2 database, raising an invalid date...
3
by: Melissa | last post by:
What specifically causes the Format event of a report's section to fire? Thanks! Melissa
11
by: Grumble | last post by:
Hello, I have the following structure: struct foo { char *format; /* format string to be used with printf() */ int nparm; /* number of %d specifiers in the format string */ /* 0 <= nparm <=...
7
by: Alpha | last post by:
Hi, I'm maintaining C# code and am fairly new with C# programming. I'm looking for codes that's droping the 2nd digit of a nuber printed out and I suspect it's the code below. Can someone tell me...
4
by: David Morris | last post by:
Hi Could somebody please explain what the following line of code means String.Format("{0}\{1}.{2:00}", C:\, myfile.txt, 1 It's actually the first argument that I don't understand. What is...
13
by: Roy | last post by:
Hi all, I'm creating a project that should always use this date format when displays the dates or create dates. The back end database is a SQL Server and I like to know what is the logical way...
3
by: Carl Trachte | last post by:
Hello. Python 3.0.a1 has been released. I'm trying to get the hang of the new string formatting in the form: '5.66' There are more options in PEP 3101 (fill, alignment, etc.), but I'm having...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.