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.
We have a database that serves-up content to a website. Some of those items are events, some are news articles. They're stored in the DB as formatted HTML so ASP just drops them right into a page shell.
Now, we want to send out a newsletter email containing some of those items. No problem sending as HTML. However, some of the members want just plain text. Is there some magic method in CDO that can automatically convert HTML to plain text? Or, is there some existing VBScript code out there that can do this?
BTW, the environment is IIS 5.x (Windows 2000), Classic ASP, and CDO.
The emails are coming through fine, though in Outlook the option to 'View as Plain Text' is greyed-out. This should let the user see the plain text version as defined in the code above, but it is inactive.
Is it possible to send email both as plain text and html in the same email using asp?,,,if so...how do you do it and what do you need to set up to do it.
How to send the HTML and Text email at the same time? CDONTS only send one type of email at one time and we should know before hand what type of email the client can receive. In my case i want to send both and depending on clients email reader the right one should show up. I have used ASP email component also but for this component to work properly we should have relaying enabled on our SMTP server. Due to the threats of SPAM i dont want to do this. I am not any demanding here but simply trying to find the better way.
I have text that a user enters via a form.This text is saved to a database named SText. The actual text is under the record "text". Now, I want to write the code to see if they enter in a link like http://www.blabla.com it will convert it to a hyper link to that very address.
i want to have a complete text-to-html conversion within a string. but "<" and ">" shouldn't be replaced. so the htmlreplace function would do too much for me and the search function only offered me single replacements. Code:
Is it possible with CDOSYS to send HTML emails with a plain text alternative? If not, I'm going to have to purchase 3rd party mail component (e.g. JMail) which I'm not really keen to do.
I have a blog online and I'm wanting to make an ASP page on my computer to just input the title of the daily update and the "entry" I'm making. So I'm developing a form page so that when I submit the information from it, it goes into a page that shows the HTML so all I have to do is copy and paste. Question is when for instance I'm typing in my "entry for the day" and I have a break I need it to automatically put in a <p> or <br> for me
Is it possible, using CDONTS, to send out both a text and HTML version of an e-mail (in the same e-mail) so that people who have HTML turned off on their client will see the text version?
I have an html page, how would I be able to just get the words in it? I mean I can probably program to get it but is there any existing tool that we can use and just fetch the word content of a html page?
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.
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?
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 ?
i have a field which contains html code, which is then rendered as a layout for several templates.the user can change the template if they so wish. the layout html is currently stored as a varchar 8000 - but 8000 characters is not enough for detailed layouts. i dont know where to begin on this problem, does anybody have any useful links. i would search in more detail but i dont know the procedure is called for what i am doing what i need to do, is have the asp refer to a html/text file and render the html directly from that file? Is this possible? or is there any other such ways to do the same thing.
I need to populate a field with html formated text. I'm using a simple form field to do so.
When I use a textarea to return the record, it comes out formatted, but when I use a Response.Write command, it comes out as plain text. Anyone can tell me how to make the response.write publish formated text?
I have a requirement to display Html text to Image (any format).
Let say i have text as "TEST", this value i need to convert to Image and display. Please let me know if there is any tool or code sample to resolve my purpose.
In HTML , I need textarea box with 4 rows & 5 cols . But if I enter the 4 th row, it shouldnt allow 5 th row. Only 4 rows should be accepted, can anyone tell me hw to creat text box?
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?
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?
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'>".
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:
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?
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> " ... ..
I dont have CDONTS support. i am using the following script. with this, even yahoo doesn't consider the email to be HTML and displays all the HTML tags and treats it as TEXT. here is the code i use! Please dont consider it abuse as i dont know how to encloase the code in TAGS!
if Request("__action")="TestEMail" then TestEMail() end if
Sub TestEMail()
Set objMail = Server.CreateObject("CDO.Message") Set objConf = Server.CreateObject("CDO.Configuration") Set objFields = objConf.Fields
With objFields .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = sMailServer .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Update End With
With objMail Set .Configuration = objConf .From = sFrom .To = sTo .Subject = sSubject .TextBody = sBody End With
Err.Clear on error resume next
objMail.Send if len(Err.Description) = 0 then mes = " Message sent to " + sTo mes = mes + " EMAIL SENT SUCCESSFULLY!" IsSuccess = true else mes = " " + Err.Description + " TESTS FAILED!" end if Set objFields = Nothing Set objConf = Nothing Set objMail = Nothing End sub
Sub Alert(html) if IsSuccess then Response.Write "<div class='testRelults' id='testSuccessful'><span class='testResult'>Success:</span>" & html & "</div>" else Response.Write "<div class='testRelults' id='testFailed'><span class='testResult'>Fail:</span>" & html & "</div>" end if End Sub %>
I'm working on an email message sent in HTML format. As the email reach the adressee the HTML is correctly visualizaed (I made sever tests with Outlook 2003).
The fact is that the code contains a <formthat should be submitted to an external ASP page. The <formtag naturally cointains a target=_blank and a proper action.
Anyway it semms to be impossible to make the form work. The submit does not work; it is evidently an Outlook permission matter...
I verified that sever other things such as <iframes and Javascript code do not work at all when an HTML is visualized in Outlook.
Is there a way, in your knowledge to go round the problem?
When I send this code (using CDONTS) I had expected just the title to appear on the email but ALL of the text - including the HTML tags are coming though.
Do I need a line setting something to HTML so it knows it's HTML? Any ideas???
CODE IN QUESTION: Body= Body & "<HTML>" Body = Body & "<HEAD>" Body = Body & "<TITLE>Send Mail with HTML</TITLE>" Body = Body & "</HEAD>" Body = Body & "<BODY bgcolor=""lightyellow"">"
RESULTING EMAIL: <HTML><HEAD><TITLE>Send Mail with HTML</TITLE></HEAD><BODY bgcolor="lightyellow">