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
ADVERTISEMENT
I'm runnign Win Server 2003 and using the CDOSYS method of sending an email using ASP. Is it possible to change the content type of the email to plain text?...here is my code:
'Email code'
'Define the variables first'
Dim varName, varEmail
varName = "Cinema-WAP"
varEmail = "cinema@wap.com"
'THE MAIL OBJECT'
Dim ObjMail
Set ObjMail = Server.CreateObject("CDO.Message")
objMail.From = varName & " <" & varEmail & ">"
objMail.To = finalEmail
objMail.Subject = "Hi " & bookerName & ", your Cinema-WAP booking REF: " & finalRef
objMail.HTMLBody = "<ul>" &_
"<li>Film:</li> <b>" & finalMovie & "</b>" &_
"<li>Screen name:</li> <b>" & finalScreen & "</b>" &_
"<li>Number of seats booked:</li> <b>" & seatID & "</b>" &_
"<li>Date:</li> <b>" & finalShowing & "</b>" &_
"<li>Name:</li> <b>" & bookerName & "</b>" &_
"<li>Mobile phone:</li> <b>" & bookerTel & "</b>" &_
"<li>Email:</li> <b>" & finalEmail & "</b>" &_
"<li>Cost:</li> <b>£" & finalPrice & "0</b>" &_
"</ul><br>" &_
"Enjoy the film!</font>"
objMail.Send
Set objMail = Nothing
View Replies
View Related
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
I am currently taking a lot of web form information and compiling it into a word document for users to download; however, I want to be able to embed any attachments
that they have inside the word document. The attachments are coming from a database and the office suite does not reside on
the server. Does anyone know if it is possible to create a word document with embedded attachments for download.
View Replies
View Related
On the website i'm working on, i'm using a database filled
with pdf files. Users can download these files from the website.
When you click the link of a file, you see a popup screen that asks you
wether you want to download the file or open it. My problem is that it
is empty behind the content type. The download works fine, and i have
the content type stored in my database. What do i do wrong here??
If Not rs.EOF Then
Response.AddHeader "content-disposition", "attachment; filename=""" & titleDownload & """"
Response.ContentType = rs("Content Type")
Response.BinaryWrite rs("File Data")
End If
View Replies
View Related
- we've form to be filled. and data will be mailed
- what happens is, mail shows up special characters in places of
commas, and other special characters inputted
following characters are shown in mail content
7E
%2
%0
what can be reason and how to overcome
View Replies
View Related
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
View Related
Any one help me out how to add additional (dynamic content) When we open a mail. Is it possible using ASP.
View Replies
View Related
In my site one page, named "category.asp". I send category id by query string, to show related categories. like: "category.asp?cid=2"
Now problem is that, when i see page "category.asp?cid=2", it executes successfully, but in the middle of page is see this error message <b>"HTTP/1.1 401 Access Denied Content-Type: text/html Date: Tue, 03 May 2005 20:26:06 GMT Connection: Keep-Alive 401 Access Denied. LANGUARD RESTRICTED OBJECT. completion addition to fulfillpacket size the EnD"</b> and after that error, page executing suspends.
It is the problem with only one category "category.asp?cid=2" and all other categories runs successfully, like "category.asp?cid=1" or "category.asp?cid=3".
View Replies
View Related
My other problem with the code that I am writing is that I cannot get the email funtion working. I eventually want it to use another SMTP server rather than running on the local machine using IIS' built in email system.
The code is very simple as follows:
<%
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Email Test"
myMail.From="me@test.com"
myMail.To="someone@somedomain.com"
myMail.TextBody="This is a CDO email test."
myMail.Send
%>
This should work fine as far as I can tell, I am running win xp pro with IIS installed and SMTP service running. When I access the page though I get the following error:
<LI>Error Type:
(0x8007007E)
/mycal/email.asp, line 12
<LI>Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
<LI>Page:
GET /mycal/email.asp
<LI>Time:
09 March 2005, 10:26:01
CDOSYS.dll is present in the windowssystem32 directory, I can only presume it is something to do with that, but I really don't know. I tried to register the dll in regsvr32 to see if that was the problem, but it said it couldn't register it (return code 0x800704da).
View Replies
View Related
In my code to send email from VBScript, I use standard CDOSYS code similar to
the following:
With oMsg
Set .Configuration = oCon
.To = """Admin"" <admin@mycompany.com>"
.From = """Joe Admin"" <jadmin@mycompany.com>"
.Subject = "Hey You!"
.TextBody = "Service(s) have failed!"
.Send
End With
I understand the use of the .HTMLBody property, as well as the
..CreateMHTMLBody method. So I know I can create an ASP or HTML page, and
pass it to the .CreateMHTMLBody method, to get the images truly embedded, so
the email source contains the cid:blahblahblah references to the images,
which is key to getting the email to display properly in web-based mail
clients.
My question is... how do I achieve the same thing (embed the images) that
the .CreateMHTMLBody method does automatically, manually, so I can also
inject values passed from a form postback into the email?
It seems that I shouldn't use the .CreateMHTMLBody method. It seems that I
need to manually accomplish what it accomplishes automatically, so I have
more granular control. But I have found no thorough online resources that
explain exactly how. I have thoroughly looked at all of the SDK information
pertaining to CDOSYS, and I am still in dire need of an example for
VBScript...
It seems that the .AddRelatedBodyPart method is part of the answer, but when
I use it to embed the images and fill .HTMLBody, rather than using the
..CreateMHTMLBody method, I do not see cid:blahblahblah in the email source,
and the images do not display properly in web-based mail clients such as
Outlook Web Access.
I really need some help on this. It would also appear that I am not alone.
I find plenty of questions on this, but no answers. Can anyone help with a
working VBScript example that embeds images into an email in a fashion that
yields the cid:blahblahblah in the email source, for the image references,
that does not use the .CreateMHTMLBody method to do the work automatically?
View Replies
View Related
I've been using CDOSYS Mail and this bit of code fine for a year. Well, we wanted to change the method of sending email from the Webserver sending it, to designating a specific SMPT server.
So, I found this code on MSFT's web site (MSFT CDOSYS SMTP ) that will allow me to do this, and it works, except that the redirect command that I have at the end of the file no longer works. I have no idea why.
Thi is the error I get:
error '8004020f'
/asp/send_email_foundation_conf.asp, line 78
Code: ...........
View Replies
View Related
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.
View Replies
View Related
I'm a PHP programmer who for some reason was tasked with fixing some code on an asp page. I have what I feel should work, but I am getting this error:
CDO.Message.1 error '8004020c'
At least one recipient is required, but none were found.
/admin/mass_email_monthly.asp, line 47
Line 47 being this line: objMessage.Send
Now I want to have multiple recipients pulled from the database as illustrated in the code, but it isn't working. I have no idea why, and I have no idea what that error message means? Can anyone point me in the proper direction of a tutorial that can help? OR possibly show me where my syntax is wrong?
View Replies
View Related
I am making a multi-page form that will be sent to email... I have no problems sending the form data to the email address, but I keep getting TWO COPIES of the same email!!! What's going on? Code:
View Replies
View Related
i want to build a trouble ticket system. i'd like to have a component
written in vbscript watch a specific mail folder for income email (something
like 'troubletickets@acme.com') the system should write the sender's email
address, time received, and message body to sql server, return a new trouble
ticket, etc. anybody know how to set this kind of thing up?
View Replies
View Related
Anyone got much of a clue how best to send emails to selected people from a database table and to be able to track them, maybe as much as a read receipt, or perhaps just checking that they don't bounce, or end up in the bad mail folder.
Is this best/possible to try and code or is there a free/cheap component that does this simply.
View Replies
View Related
Using ASP I'd like to modify a string that contains HTML. I need to modify the content (the bit that the users see) but not the stuff in the tags. For example, if I had the following string Code:
View Replies
View Related
I got a problem while running an application. The code for this is as follows:
aList = Split(strMsg,";")
For nX = 0 to UBound(aList)
strarry=split(aList(nX),"_")
var_year=left(strarry(2),4)
var_month=mid(strarry(2),5,2)
var_day=mid(strarry(2),7,2)
var_date=var_day&"-"&var_month&"-"&var_year
var_time1=mid(strarry(2),9,2)
var_time2=mid(strarry(2),11,2)
var_time=var_time1&":"&var_time2
set rs1=conn.execute("insert into tbl_BackupfileInfo(Filename,Createddate,Createdtim e)values('" &aList(nX)&"','"&var_date&"','"&var_time&"')")
Next
while runnig this application some times it works fine .But some times it giving an error
Error Type:Microsoft VBScript runtime (0x800A000D) Type mismatch: 'UBound'.
View Replies
View Related
I need some help: with cdosys i'm able to send e-mail from asp using the local exchange
server. Now I also have to save the sent mail into the user's mailbox for future reference: how to?
I'm using:....
View Replies
View Related
Does anybody know if it's possible to send MSN/ICQ messages with ASP to registered MSN/ICQ users
View Replies
View Related
I have been searching high and low, but can't find what I want. I am looking for scripts or some guidance on building a web based messaging thing. where users can leave private messages for other users. Maybe i am using the wrong keywords.
View Replies
View Related
how to send SMS messages via ASP? If so, please would someone post a couple of links or the relevant information that will help me achieve this?
View Replies
View Related
I'm using CDO to send mail to the site owner from ASP pages with forms.
Recently one of my forms is occasionally sending email with what seems
to be an insertion which is replacing the plain text part of the email
with something else. Looking at the server sent email source, the
hacked emails have the following:
View Replies
View Related
I have the following code as a part of authenticating a system.
If Rs.eof Then
Session("Authenticated") = 0
Response.Write "Sorry, your userid or password did not match"
Response.Write "<BR>"
Response.Write "or you have not registered yet. Please register"
Response.Redirect("login.asp")
Else
Session("Authenticated") = 1
Response.Redirect ("Welcome.asp")
End If
In the first if statement, I would like to display the above messages
before forcing the login.asp page to display. Is is possible to do both
message and contents of login.asp in the same page? Thanks
View Replies
View Related
My application saves variable length user-generated messages in an
ACCESS memo field. ASP writes these messages correctly retaining CR LF to
generate new paragraphs. (have checked this in the actual data base).
However , when I retrieve a message into another web page, the CR LF
characters are lost, and the message displays as one long sequence of
unformatted text. Anyone any idea how I can overcome this?
Using WIN XP/FP2000/IIS and the following code:-
<%
set objconn = server.createobject ("ADODB.connection")
set objrec = server.createobject ("ADODB.recordset")
objconn.open "DSN=daters"
strsql = "SELECT messages.text FROM messages WHERE messid = 305 ;"
objrec.open strsql, objconn, adopenforwardonly, adlockoptimistic,adcmdtext
%>
<%=objrec("text")%>
View Replies
View Related
I'm running asp on MS Server 2000. Running Internet Explorer I used to get a
proper message with page and line number when there was a bug in my asp
code. Suddenly I'm not getting these any more, I just get the standard
HTTP 500 - Internal server error
Internet Explorer
page which is completely useless.
In Tools/Internet Options/Advanced neither "Disable Script Debugging" or
"Disable a notification about every script error" is checked, though I think
these only apply to scripts running in the client e.g. javascript.
View Replies
View Related
I'm using IIS from win xp pro and normally when my page doesn't work i get
the error message but not on my computer....
Someone told me that i had to check the option in my IE, i did that but i
still don't get the messages. In my IIS i told him to activate errormessages
on the client and server but nothing
View Replies
View Related
I have inserted a free forum from youngpip.com into a website (www.mrmci.com/discuss) and although it works fine on my pws it keeps generating error 500 messages when on the net. Any attempt to write to the database returns this error (it reads from the DB fine).
Any ideas folks
View Replies
View Related
does anyone know whether it's possible to send an SMS message to a UK mobile phone through an asp script on a website?If so, do u know anything about whether you need to pay the network operator etc.
View Replies
View Related
i used to show eror messages in following fashion
if request.form("username")="" and request.form("password")="" then
response.redirect("login.asp?msg=You have to login in order to access this page")
end if
As a result of which the page is directed to login.asp and msg is displayed but the url becomes like this
www.mysite.com/login.asp?msg=You%20Have%20To%20Login%20In%20Order %20To%20Access%20This%20Page
which looks very bad when we look at it. i want to display the msg but want the url like
www.mywebsite.com/login.asp
View Replies
View Related
I have recently created a mail site as a part of the local intranet. the problem is that as i insert textarea message into the database, everything goes on fine.. but if i try to insert a text with single quotes(eg apostrophes) like vivek's into the database, it gives an error message. i know this is happening because of unmatched quotes in the text.. but i am unable to debug it.
View Replies
View Related
I am running a website on a IIS 5.0. I recently noticed that whenever I test an asp page, if there's an error in my ASP code, I do not see any details as to why the error occurred, but rather just a generic http 500 page...Before, it used to tell me for instance that a variable was not declared and also indicated the line number etc. but not anymore.
why is this and what do I need to change in IIS to get these detailed error messages back.
View Replies
View Related