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'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 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?
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.
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">
I am currently building an emailing system into our asp management system. From this we will be able to setup mail templates (html stored in mssql database) and select who we want to send them to.The html in the database is only the middle part of the html file being sent. All the emails are based on the same design template using a single html file to which I pass a variable saying which body to get from the database <%=writeBody%>. So far this is all working fine and the emails are sending using cdo.
What i am trying to do now is personalise the emails and on the responseSendForm.asp I connect to the database and create variables such as fName, lName etc.I need to be able to write these variables in the html in the database which will then display in the body using the <%=writeBody%>.As you may have guess this is not working and I dont know enough aboutthe .createMHTMLBody to work out what to do.
i have a web site built using vbasic active server scripting running on iis (it works on either iis 50 and 60, but is designed for iis 50). i know how to create a plain text email by creating a text file, with content following certain format, and saving that file into the correct '..mailrootpickup' folder, and it is working fine.
what i would like to know is how to create and send an email in html format from my server script. i will appreciate anyone who can tell me where to find instructions on how to do this.
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?
This is my first post hope it makes sense. I have learnt how to send emails from forms passing variable etc and it works, but I am lazy so here it goes:
I am writing a set of intranet based asp reports for which the underlying asp code can get quite complicated (tables nested in tables, all sorts of calulations and parameters etc). I would like users to be able to send that report (neatly formated in his browser) by pressing a form button. (by the way, we use Outlook)
1. either as an .html attachement (which would of been saved automatically either locally or on the server)
2. or as an html email (as you would do when doing File > Send > Page by Email in IE 6.0) Code:
Can anyone get me started or point me to a resource for some help?
I have an ASP page that displays various boxes, tables, and information. I want to be able to click an "Email" button and have the asp page save the page as an attachment (html?) and then launch Outlook and automatically attach the page to it and enter the email address of the person I want to send it to.
I can't just send a link because the page is generated on an Intranet and I need to send it to people outside the network. So, I need to save a print screen of the page and then have Outlook grab that and the recipient's email address and put those into Outlook so the sender can review and send out.
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.
Usually, when I send HTML emails, I just SRC the image to my web server, but now I would like to consider embedding images for those instances when potential customers may view the email when offline.
Can this be done with CDO or is another component required?
I'm using CDO SYS to send email messages. I can attach a file just fine. However, I need to attach an HTML page that's generated on the fly by my ASP code. The attachment source code gets assembled into a VB string. How do I attach this? I think there was an easy way in CDONTS but that's no longer an option.
I been trying to send a Html email with a form included. I tryed by including <form> and <input> as usual in Html code. What happen is that the email is send and the form are seen but the input button doesnt work right, in hotmail , msn, I mean its not active Any idea?
All of my previous web page work has been done with .html and Cold Fusion. My new host does not support cold fusion but does have ASP 3.0 and ASP.Net 1.1. They've told me that I have to use CDO.Sys for sending email. I've spent the past 3 days doing all the research I can find but most of the examples assume a basic knowledge of ASP (which I am severly lacking in).
I have a simple .html form (4 fields) that currently DOES get sent through email (although it is sent as plain text). I would like to be able to send an email that is formatted into html (allowing me to use tables, images, etc.
Here is what I have so far (I've commented out the "text" based part and am trying to send as an html email now).
I want to send email in html format with containing more images added dynamically using cdo.message method. can you pls explain any body one how to do this. i alredy done this, but it send only one picture with that email. here i posted my code also. pls any one tell me what is the problem in this code.
html = "<html>" html = html & "<head>" html = html & "<meta http-equiv=""Content-Type""" html = html & "content=""text/html; charset=iso-8859-1"">" html = html & "</head>" html = html & "<body>" html = html & "<p><font face=""Arial"" ><b>Name: " & name & "</b></font></p>" html = html & "<p><font face=""Arial""><b>Company Name: " & cname & "</b></font></p>" html = html & "<p><font face=""Arial""><b>Country: " & ctry & "</b></font></p>" html = html & "<p><font face=""Arial""><b>E-mail: " & email & "</b></font></p>" html = html & "<p><font face=""Arial""><b>Details: " & remarks & "</b></font></p>" html = html & "<p> </p>"
for i = 0 to ubound(iid) html = html & "<img border=""0"" src=""" & "http://www.abcd.com/img/" & fnme(i) & """></td>" next
html = html & "</body>" html = html & "</html>"
mail.From= emailFrom mail.Configuration=cdoConfig mail.To = emailTo mail.Subject = emailSubject mail.HTMLBody = html mail.Send set mail = nothing set cdoConfig = nothing
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.
I have designed a form after submission of which an email is sent to a perticular e-mail id. Up to this it works fine but I need to send a complete filled html page in attachment too.
Can this be possible. If any way to do this please let me know. As mail sender am using CDO.
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.
I have a web form where a client can select which site members to send an email to.
This form is populated from the contents of the member table, so the form can have 0-x names listed on it depending on member expiration dates.
When the form is submitted, the code loops through the form contents and sends an email to those members that meet the selected criteria.
All this worked perfectly when I was sending text emails, but since I changed, it sends the message correctly, but the last person gets everyone else as well. For example, if I have three members (mem1, mem2 and mem3) to send emails to, here is what happens
mem1 gets the correctly formatted message
mem2 gets mem1's correctly formatted message plus mem2's message - one right after the other. Code:
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.)