Hi folks,
I'm trying to create a sub that e-mails the results of program output
to our accounts receivable manager. I built my CDO code using examples
from a couple newsgroups like this one, so I didn't see any examples
of how the message body is coded.
I wrote the CDO mailer as shown below, the output is all there but the
carriage returns don't carry into the e-mail message, the message body
appears as one line. Is the sample below the most efficient way for
doing this, and how do I get the mail message to format carriage
returns, etc? Any advice or code snippets would be much appreciated.
Thanks,
Andre
email.BodyFormat = MailFormat.Html
email.Priority = MailPriority.High
email.From = "X@X.COM"
email.To = "X@X.COM"
email.Subject = "Nextel Correction Utility (do not reply)"
email.Body = "Account Number: " & lblAccountKey.Text &
Chr(10) & _
"Service ID: " & lngServiceID & Chr(10) & _
"Completed Employee: " & strCompletedEmployee & Chr(10) & _
"Service: " & strService & Chr(10) & _
"Measurement: " & intMeasurement & Chr(10) & _
"Mix Code: " & strItemID & Chr(10) & _
"Actual Quantity: " & intItemActualUnits & Chr(10) & _
"Temperature: " & intTemperature & Chr(10) & _
"Wind Direction: " & strWindDirection & Chr(10) & _
"Wind Speed: " & intWindSpeed & Chr(10) & _
"Amount Completed: $" & Format(curAmountCompleted,
"#,##0.00") & vbCrLf & _
"Tax Completed: $" & Format(curTaxCompleted, "#,##0.00") &
vbCrLf & _
"Sales Amount: $" & Format(curSaleAmount, "#,##0.00") &
vbCrLf & _
"Tax Amount: $" & Format(curTaxAmount, "#,##0.00") &
vbCrLf & _
"Total Invoice: $" & Format(curTotalInvoice, "#,##0.00") &
vbCrLf & _
"Renewal Amount: $" & Format(curRenewalAmount, "#,##0.00")
& vbCrLf & _
"Sales Comm Value: $" & Format(curSalesCommValue, "#,##0.00")
& vbCrLf & _
"Prod Comm Value: $" & Format(curProdCommValue, "#,##0.00")
& vbCrLf
'// Send the e-mail
SmtpMail.SmtpServer = "X.X.X.X"
SmtpMail.Send(email) 1 6053
Hi Andre
Since the format is email.BodyFormat = MailFormat.Html
You should use "<BR>" or "<P>" "</P>" instead
HTH Marcos
"Andre" <an**********@hotmail.com> escreveu na mensagem
news:87**************************@posting.google.c om... Hi folks,
I'm trying to create a sub that e-mails the results of program output to our accounts receivable manager. I built my CDO code using examples from a couple newsgroups like this one, so I didn't see any examples of how the message body is coded.
I wrote the CDO mailer as shown below, the output is all there but the carriage returns don't carry into the e-mail message, the message body appears as one line. Is the sample below the most efficient way for doing this, and how do I get the mail message to format carriage returns, etc? Any advice or code snippets would be much appreciated.
Thanks,
Andre email.BodyFormat = MailFormat.Html email.Priority = MailPriority.High email.From = "X@X.COM" email.To = "X@X.COM" email.Subject = "Nextel Correction Utility (do not reply)" email.Body = "Account Number: " & lblAccountKey.Text & Chr(10) & _ "Service ID: " & lngServiceID & Chr(10) & _ "Completed Employee: " & strCompletedEmployee & Chr(10) & _ "Service: " & strService & Chr(10) & _ "Measurement: " & intMeasurement & Chr(10) & _ "Mix Code: " & strItemID & Chr(10) & _ "Actual Quantity: " & intItemActualUnits & Chr(10) & _ "Temperature: " & intTemperature & Chr(10) & _ "Wind Direction: " & strWindDirection & Chr(10) & _ "Wind Speed: " & intWindSpeed & Chr(10) & _ "Amount Completed: $" & Format(curAmountCompleted, "#,##0.00") & vbCrLf & _ "Tax Completed: $" & Format(curTaxCompleted, "#,##0.00") & vbCrLf & _ "Sales Amount: $" & Format(curSaleAmount, "#,##0.00") & vbCrLf & _ "Tax Amount: $" & Format(curTaxAmount, "#,##0.00") & vbCrLf & _ "Total Invoice: $" & Format(curTotalInvoice, "#,##0.00") & vbCrLf & _ "Renewal Amount: $" & Format(curRenewalAmount, "#,##0.00") & vbCrLf & _ "Sales Comm Value: $" & Format(curSalesCommValue, "#,##0.00") & vbCrLf & _ "Prod Comm Value: $" & Format(curProdCommValue, "#,##0.00") & vbCrLf
'// Send the e-mail SmtpMail.SmtpServer = "X.X.X.X" SmtpMail.Send(email) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Dan Weeb |
last post by:
Hi All,
I have struggled through this far with help from many of you so thanks. I am
stuck again. I am really new to this so don't be harsh :-)
There are a few problems. You can run the script...
|
by: Rob Meade |
last post by:
Hi all,
Ok - this leads on from speaking to a couple here and in the SQL server
group...
I've an application which allows the user to type in their text into a form,
they add 'happy' tags...
|
by: Jonathan |
last post by:
Hi,
I have to use the nl2br function in the asp file, luckly I got this
code from a site. What I need done is to display textbox content the
way it was typed/pasted i.e. with paragraph breaks and...
|
by: Petre Huile |
last post by:
I'm trying to mail form data by using the technique:
form.action="mailto:address?Subject=subject&body=bodyText"
(the placeholders above are obviously not real :)).
The thing is I want to...
|
by: Tom Petersen |
last post by:
I have this:
1 emailBody = "<html>" & vbCrLf _
2 & "<head>" & vbCrLf _
3 & "<title>Interpreter Request details</title> " &
vbCrLf _
4 ...
|
by: BBFrost |
last post by:
I'm receiving decimal values from database queries and placing them on a
report page.
The users want to see the following ....
Db Value Display Value
123.3400 123.34...
|
by: sck10 |
last post by:
Hello,
I have a page with an ImageButton that is used to redirect to another page.
When the page first opens, everything looks as expected. However, when I
click on the image, the new page...
|
by: Ken Wigle |
last post by:
All,
I would be very grateful for any help on this question. I have an
application in asp.net 2.0 where I dynamically create a datatable and then
bind that to a gridview. Unfortunately, the...
|
by: SAL |
last post by:
Hello,
I am sending an e-mail message from my ASP.NET 2.0 application. The body of
the message is coming from a database and formatting has already been
applied to the text. My problem is that if...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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...
|
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,...
|
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...
|
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...
| |