CDO Question -- Generating Email Messages In HTML Format

CDO is perhaps the most obscure art in web programming, but I hope someone
would understand my issue. I have an ASP web application that needs to send
email messages in HTML format only -- there is no plain text version. The
messages are summaries of answers that people have input into an online
survey, and need to have a tabular form.

The following somewhat plausible code does not work:

dim OMsg
Set OMsg = Server.CreateObject("CDO.Message")
OMsg.Fields("urn:schemas:mailheader:return-path") = BounceEmail
OMsg.Fields("urn:schemas:mailheader:content-type") = "text/html"
OMsg.Fields.Update

The return path header is set as desired, but the content type header
stubbornly defaults to "text/plain". What is the secret to setting that
header?

I have seen lots of code examples on the MSDN site for setting the
content-type of body parts, but it seems needlessly complicated for my
situation and doesn't work on my system anyhow (unknown ProgID error). So I
was hoping to just set the message-level header to "text/html". (If I edit
one of the messages from my script in notepad, changing the header to
text/html by hand, it then is rendered correctly in email clients.)

View Replies


ADVERTISEMENT

Generating A Html Email Containing Graphics

have a question about sending HTML based email containing graphics. I am using the cdosys component to send an email from a ASP script. If the generated HTML message contains graphics, do I need to include those files as mail attachments to the email? Or as a easier solution is it possible to use a full URL to a image as a image source, if so how?

View Replies View Related

Generating Email Address And Textarea To Be Inlcluded On Email

1. I want users to type in their email address on a textfield, and after users press the "Submit" button. The info will automatically go to another person's email to receive a compliment, suggestion, etcetera.

2. Another is how to include the message written on a textarea of a form with the ASP code supplied below: Code:

View Replies View Related

CDOSYS - HTML And TEXT Messages

Is there a way for me to send TEXT-only (i.e. no HTML) email message via
CDOSYS in ASP 3.0?

View Replies View Related

Generating HTML Reports

I want to generate HTML based reports with ASP. But the problem which i m having is to controll the Paging operation while printing the reports.

Unlike the Professional reports softwares as Crystal Reports and Also the Data Reports of visual basic (which are controlling the Paging automatically), a mannually generated HTML based reports need some logic to perform paging operation while printing.

View Replies View Related

Generating HTML Mail

I m displaying details of a document after getting data from multiple tables of my database. Now i wanted to generate an HTML enabled email with the same
document as content. I m using ChilkatWebMail for this purpose which has a method
objMail.send([HTML Here]).

When i send this mail it generates error. Actual problem is organizing html data before sending. I can't write whole html in send() method. Because my html is very long and fetches data at runtime. I m also uses subroutines to perform individual tasks. So whenever i call a subroutine,it generates error.

View Replies View Related

Sending (text Or Html Version) Messages Using JMail

I have that form that send email to subscribers. Even if the specified option is set to "TEXT" I still see the HTML coding in the message... Tho when I look the source of the message I see "X-Mailer: JMail 4.5 by Dimac

Content-type: text/plain; charset=iso-8859-1: and all the <br> code are that way : <br=3E

my jmail code:

View Replies View Related

Duplicate Email Messages

I'm running into a problem where in code I'm definitely only saying jmail.execute one time, but am receiving two emails. The time stamps and content are identical, but the message id is different.

It does not happen everytime. Is this a known bug with jmail? Has anyone run into this? The message id being different should be enough proof that it's not a problem with the mail server.

View Replies View Related

Generating A Secure Email....

On our website, a user can order products from us. When they "submit" the
order, the website designer has written some ASP code to auto send an email
to our Exchagne 2000 server. Due to the contents of the email, we need to
secure it... How can we send a "secured" email from ASp script or would
this not be a function of ASp at all but the server the email is being sent
from? There must be something in the ASP code to indicate the email needs to
be secured?

View Replies View Related

Mail Content-type And Messages In One Email ASPMailCtrl.1

What I want to do, is to be able to send only one email with tow header text/plain and text/html with two different messages

I was able to do it only to send two email with different content-type and messages, but I would like it to send only one email with two content-type headers and two messages ...

View Replies View Related

Html Format

can anybody help me out?what i need to do is -- upload a .doc file to an
html format so that the formatted text is not changed.

View Replies View Related

HTML Format Emails

I have an application which sends out emails in HTML format. I have a problem when I am trying to display images in the email (name of the image file is taken from database).

The problem is that if there is a space in the image file name, it displays a + (PLUS sign) and does not display the photo in GMAIL and other emails. The URL of the image gets displayed in the following manner:

3_Marathon+Crescent_Toronto_1.jpg+

How do I solve this + (PLUS sign) issue?

View Replies View Related

Sending Emails In Html Format

I am trying to send an email from an asp page in html format unfortunately when parenthese appear in the HTML code of the page to be emailed the ASP page reads them and trys to interpret them as ASP code

<div align="center">

any suggestions?

View Replies View Related

Write From An Html Form To Csv Format

I created a web form in html, I need to create a server-side script
using ASP and embed it into the html, so that when the user clicks
submit, it sends(saves) the data from text boxes, drop-downs etc, to a
text(.txt) file on the server. It needs to be in csv format so that
they can create an excel file from it.

View Replies View Related

Send E-mail In HTML Format

If i want to send an email in HTML format, do i just set the bodyFormat to 1 or it's much more complicated? any examples available?

View Replies View Related

Send HTML Body Format CDO Mail

I have been using CDO Mail but the message body is plain text. Is there a way that I may send an HTML body so that I can format some tables?

View Replies View Related

Special Characters To Be Converted In Html Encoded Format

I want the special characters to be converted in html encoded format. i am using asp.

but i m getting the same string that i have passed as output.

input:

<% Response.Write("the html characters =" & Server.HtmlEncode("<p>")) %>

output:

the html characters =<p>

is there anything more required to do this.

View Replies View Related

Displaying Image Using The Mailer Object In HTML Format

The code sends an automatic email, but the email is html format. At the top of the email i want to include an image.

Everything is working except the image is not being included, instead a box with a X appears.

Here is the code that i am currently using

Dim htmlMess ' THIS STORES THE HTML CODE

PHP Code:

View Replies View Related

Form Processing Script: Results In HTML Mail Format?

I have purchased a form processing script, which basically saves the data into a database, emails certain people's email addresses with the form results, and also sends an email to the user that filled in the form with a thank you email.

However, all the emails are being sent in plain text format. I would like to change this to HTML so I can make the results look nicer and also make the thank you email look nicer.

I have emailed the script developers, but have yet had a response from them, so i thought id put a post on here!

I have found the part of the coding that sends the Thank You email out to the user once they have filled in the form:

'/// Send Autoresponse
if replyto<>"" and (autoresponse<>"" or sendcopy<>"") then
if sendcopy<>"" then autoresponse=autoresponse & vbcrlf & vbcrlf & message
call sendmail(replyto,mailadmin,formname,autoresponse)
end if
end if .......

View Replies View Related

Email Format

I have a problem don't know how to write the attachment file frm mail....

<html>
<head>
<title>Thank you for reply with us.</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<%@ Language=VBScript %>
<%
Dim strBody
Dim myElement

For Each myElement in Request.Form
Select Case Left(myElement ,3)
Case "txt","sel","rad":
strBody = strBody & Replace(Mid(myElement,4,len(myElement)),"."," ") & _
": "
if Len(Request.Form(myElement)) = 0 then
strBody = strBody & "UNANSWERED"
else
strBody = strBody & Request.Form(myElement)
end if

strBody = strBody & vbCrLf

Case "chk":
strBody = strBody & Replace(Mid(myElement,4,len(myElement)),"."," ") & _
": " & Request.Form(myElement) & vbCrLf
Case "are":
strBody = strBody & Replace(Mid(myElement,4,len(myElement)),"."," ") & _
": " & Request.Form(myElement) & vbCrLf
End Select
Next

strBody = strBody & vbCrLf & strFooter

'Time to send the email
'Dim smtp
Set smtp = server.CreateObject("CDONTS.NewMail")

'******************************************
' set the mail properties
'******************************************
smtp.Subject = "ApplicationForm"
smtp.From = "ApplicationForm"
smtp.To = "connie@auroraxsis.com"
smtp.Body = strBody


'******************************************
' fire off the email message
'******************************************
smtp.Send
'Response.Redirect "thankyou.asp"

'******************************************
' check return value error code
'******************************************
'if objMail.errorCode = mmeNone then
' Response.Redirect "thankyou.htm"
'else
' Response.Write ("Mail message was not delevered to the SMTP server." & "<br><br>")
' Response.Write ("Please try again later" & "<br><br>" )
' Response.Write ("The error code was :" & Cstr(objMail.ErrorCode) & "<br><br>" )
' Response.Redirect ""
'end if

'******************************************
' always destroy the object
'******************************************
' set smtp = Nothing

' Response.Write ("Thank you for advertising with us. We will revert to you soonest possible.")

' Response.Redirect strRedirectURL
%>
</HTML>

<script language="JavaScript">
<!--
//set message:
msg = "Welcome To International Education Counsultancy";
timeID = 10;
stcnt = 16;
wmsg = new Array(33);
wmsg[0]=msg;
blnk = " ";
for (i=1; i<32; i++)
{
b = blnk.substring(0,i);
wmsg[i]="";
for (j=0; j<msg.length; j++) wmsg[i]=wmsg[i]+msg.charAt(j)+b;
}

function wiper()
{
if (stcnt > -1) str = wmsg[stcnt]; else str = wmsg[0];
if (stcnt-- < -40) stcnt=31;
status = str;
clearTimeout(timeID);
timeID = setTimeout("wiper()",100);
}

wiper()
// -->
//-->
</script>
<style>
BODY { margin-top: 0.00in; margin-left: 0.0in;}
BODY{
scrollbar-face-color:#f5f5f5;
scrollbar-arrow-color:#000000;
scrollbar-track-color:#ffffff;
scrollbar-darkshadow-Color:'#FFFFFF';
</style>
</head>

<body bgcolor="#FFFFFF" text="#000000">
<table width="75%" cellpadding="0" cellspacing="0" height="40%" align="center">
<tr>
<td valign="middle" width="25%" height="288">
<div align="center"><img src="http://www.iec.com.my/images/tk.jpg" width="576" height="198"></div>
</td>
</tr>
</table>
</body>
</html>

View Replies View Related

Format Of Email

I'm trying to use an SQL statement to extract all email addresses from a Forum I use on my site. Some of the colums are empty as the email field in optional and others are just invalid text. What SQL statement can I use to extract all email Adds that only contain '@' ? this way I can be sure that only valid records are extracted.

...WHERE email LIKE "@"....

View Replies View Related

Format Email Form Results

Code:

Mail.Subject = "Website - Account"
strEmailText = strEmailText & "Company Name: " & Request.Form("compname") & vbCrLf
strEmailText = strEmailText & "Company Address: " & Request.Form("compadd") & vbCrLf
strEmailText = strEmailText & "Business Nature: " & Request.Form("businessnature") & vbCrLf

i would just like to know how i can add bold/underline and line breaks in this email because at the moment it just displays the email like this..

this: this thing
this: this thing... etc

View Replies View Related

Checking Email Address Format

Is there a way to check if an email address is the right format, e.g: firstname.secondname@myserver.com.I want to check that every email address entered has a firstname then a . then a second name and always @myserver.com

View Replies View Related

HTML Email

I'm sending email using CDO Message in HTML Formatted. There is no problem if client side is HTML Enable. But if it doesnt not, its showing all html tags in message body.

View Replies View Related

HTML Email Css

I've got another email prob. Does anyone know how to link an external stylesheet in an html email via asp? I've got this so far:

While NOT offerCustRS.EOF

Dim strBody

strBody = "<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.0 Transitional//EN"">"
strBody = strBody & "<html>"
strBody = strBody & "<head>"
strBody = strBody & "<title></title>"
strBody = strBody & "<meta http-equiv=Content-Type content=""text/html; charset=iso-8859-1"">"
strBody = strBody & "<link rel=""stylesheet"" href=""CSS/blue.css"" type=""text/css"">"
strBody = strBody & "</head>"
strBody = strBody & "<body>"
strBody = strBody & "<div id=""head"">Special Offers from the best online shop</div>"
strBody = strBody & "<p>"
strBody = strBody & "<div id=""content"">"
while not offerRS.EOF
strBody = strBody & "Product:" & "&nbsp;" & "<a href='http://localhost/New Shop/products.asp?id=" & offerRS("Product_ID") & "'>" & offerRS("Product_Name") & "</a><br>"
strBody = strBody & "Price:" & "&nbsp;" & offerRS("Offer_Price") & "<br>"
strBody = strBody & "</div>"
offerRS.MoveNext()
WEND

strBody = strBody & "</body>"
strBody = strBody & "</html>"

The email doesn't have any of the formatting but I haven't a clue why. The css file has been tested on another page and it works so the css is fine. Can anyone help?

View Replies View Related

Html -> Asp Email

I have created a form in html that goes to an email which will supply the person with all contact info. So I need Two things to make this work:

1.) HTML page with email form and submit button (done)
2.) ASP page with code that validates all the info and mails the info to the persons email (dont have)

SO, I need some type of code that will validate this html document. Any Ideas ?

View Replies View Related

Sending HTML Email

I have a client that wants to send HTML based email.

Building and sending isn't a problem, but he wants to include a plain text link at the top of the email that will display if the user doesn't not accept HTML email. Maybe it is the product we are using to send the email, but there is no way to include non-HTML formatted text in the email. Is there a way to send non-HTML and HTML in a single email?

View Replies View Related

Truncated Html Email

I am creating both a text and html version of the same newsletter and
sending using CDOSYS.

Both of them incorporate a list of stories drawn from a database which are
assigned to a variable storyloop.

The text version works fine, but partway throught the html version when
viewed in Outlook 2000, it goes wrong. View source shows nothing obviously
wrong, except that partway through the storyloop, it just stops and then
goes onto the next section on the email.

Outputting storyloop to the browser gives perfect results, but if I remove
all parts of the html email and just assign storyloop to the .htmlbody, I
see that after exactly 1024 characters in the resulting email, I get ------
=_NextPart_000_0057_01C59E01.6E3F5F50--

Does anyone know why this would happen, and more importantly, what I can do
to correct it?

View Replies View Related

Attach HTML Email

Is it possible to send an HTML email through CDONTS without formatting it
into one big long string?

View Replies View Related

HTML And TEXT Email Using ASP

Need help with sending HTML and Text email from ASP page. I want to specify both and depending on the receivers email reader the apropriate one should show. Any help or pointing to a source for MULTIPART MIME type is going to be greatly apreciated.

View Replies View Related

Appearing In HTML Email Set

I support a website. When we send HTML emails from out system, we generate a variable called "str". We set that str variable to the objMail.htmlbody property of the mail object. Frequently, random spaces appear in the email when it is received by the recipient, however those spaces do not always appear in the same place (yet frequently they do). additionally, we'll sometimes see some actual HTML code in the final email, and usually shows up as a complete tab, such as "<br>", or "< TD BGCOLOR='#FFFBF0'>".

View Replies View Related

Checkboxes And Dropmenus In HTML Email

I am trying to finish some ASP code for a webform of mine that takes values input into a form and upon hiting the submit button, emails the form in HTML format with all completed values in their respective boxes to the recipient specified. So far I've gotten the text box values to carry through using a line such as this:

<input name=""date2.3"" type=""text"" id=""date2.3"" value="""& Request.Form("date2.3")& """ size=""2"" maxlength=""2"">"

However, I cannot get checkbox values or dropmenu values to carry through to the resulting email. What do I need to do differently with Request.form to get it to send the checkbox and dropmenu items in the e-mail?

View Replies View Related

Creating An HTML Email Body

I have a rather large form in HTML that needs to be sent as an email. The body of the email is approx. 400 lines (that's in HTML). Is it possible to somehow transfer the entire form to the asp mail script so that it automatically sets the body of the email to contain this form (with input)? Or do I have to write the body by hand in my asp script - like this:

line 001 Body = "<table><tr><td>some text & var1 & </td></tr> "
... ..

line 200 Body = Body & "</table>"

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved