How To Send CDONTS Or CDOSYS Email With Specified Attachment?
I am trying to get a asp-mailer setup that will send a specified attachment.
I have tried both CDONTS and CDOSYS methods ... both are giving me headaches.
And the best part is how incredibly helpful the error is: (Sarcasm Intended)
Error Type:
(0x80004005)
Unspecified error <-- They should change that error to ... "Good Luck!"
/knowledgetree/emailer-drivers.asp, line 90
I hilighted the above line in the code as well.
Set mail = Server.CreateObject("CDONTS.Newmail") mail.From = janki@yahoo.co.in mail.To = sender@yahoo.com mail.Subject = "Subject" mail.Body = "newsletter" mail.AttachFile = "C: est.zip" mail.BodyFormat = 0 'CdoBodyFormatHTML mail.Send Set mail = Nothing this code is not working please help.....
if objIndexMail.Send then Response.Write("Mail Sent") else Response.Write("Failure. ") end if
and it's coming up as Failure every time. Is there a way I can see the status of the .Send command, and why it came up as a failure? no errors are being generated, it's just not sending..
Im trying to get a CDO email sent from a form submittal with an attachment which has been just uploaded with aspupload.
Everything goes ok, the file uploads when the form is submitted and I have verified this in the upload folder. It all goes pear shaped when I try to code in the CDO object. I get this error:
Error Type: Microsoft VBScript runtime (0x800A01A8) Object required: '' /profilescreative/jobapplication2.asp, line 63
I have a form that needs to handle international characters withing the UTF-8 character set. I have tried all the recommended strategies for getting utf-8 characters from form input to email message and I cannot get it to work. I need to stay with classic asp for this.
Here are some things I tried:
'CDONTS Call msg.SetLocaleIDs(65001)
'CDOSYS msg.HTMLBodyPart.Charset = "utf-8"
I included the following meta tag in the email HTML: <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
I also tried modifying the CharSet and CodePage of all involved Request and Responses.
I was able to Response.Write the form content on post back to the screen and it was properly rendered. However, none of my efforts can get the email to render with the correct codebase. I have tried opening the email in Outlook and Thunderbird. Neither one picks up on the UTF-8 charset meta tag.
I want to send email with attachment. I have no problem if the file is located on the same server but i got error when attach file from different server. This is the code,
set mail=server.CreateObject("persits.mailsender") mail.host="smtp.mydomain.com" ..... 'mail.addattachment "c:attach est.txt" ' no problem with this mail.addattachment "websvrattach est.txt" ....... mail.send
I got this error, "Persits.MailSender.4 error '800a0007' Logon failure: unknown user name or bad password."
when i changed the servername to static ip address also got the same error. any idea? fyi, this user has an administrator rights to the server.
i recently finished a tutorial on cdonts and finished putting together the page and form etc. now ive been reading and it seems cdonts is being discontinued and cdosys is taking over. does this mean that my cdonts will not work and i have to trnasfer it to cdosys ?
how can i transfer it to cdosys ? or do i have to make a completely new mail script?
I've set up a website contact page which uses CDOSYS to send form details to an email address.
However, the domain is set up such as the client is using their own mail server, and using my server only to host the website.
Ordinarily I would set up hosting with email and change the nameservers of the domain to point to my server, but in this case the client is keeping the nameserver details the same, but just updating the A record to point to my server to display the website.
Trouble is, the CDOSYS email doesn't seem to work with this set-up. Do I need to hard code their mail server IP somewhere to get it to work?
I am running Win XP and have installed the IIS SMTP service, however I'm not sure what I need to do to configure both the SMTP service and CDOSYS properly to allow me to send out email from an ASP script.
THE PROBLEM:
What is happening is the email is not sent and goes to the 'c:InetpubmailrootQueue' folder. I have checked the event viewer and the error I receive is:
Message delivery to the remote domain 'yahoo.com' failed for the following reason: The remote server did not respond to a connection attempt.
I believe the SMTP service isn't setup correctly or I haven't configured CDOSYS properly in my ASP script.
The CDOSYS part of my ASP script is setup as follows (I am using Javascript with ASP btw):
I have a CDOSYS mail and it's working ok but it sends plain text massage. But i want to send with images and links. But when i put a link with image in the .HTMLBody field like <a href="http://www.mysite.com/"><img src="file:///C:/My Documents/image.gif" border="0"></a> so, i got an error message.
I've tried to send a mail using CDONTS.DLL but the mail goes in to C:InetpubmailrootQueue"
Here is my code
Dim Mailer Set Mailer = Server.CreateObject("CDONTS.NewMail") Mailer.To = "testemail@hotmail.com" Mailer.From = "expediteur@email.com" Mailer.Subject = "Titre du message" Mailer.Body = "Le texte qui sera envoyé" Mailer.Importance = 0 Mailer.BodyFormat = 0 Mailer.MailFormat = 0 if not Mailer.Send then response.write ("mail envoye") else response.write ("Mail non envoyé. Erreur : ") & Err.Description end if Set Mailer = Nothing
I work with win xp pro, do can I use CDONTS or CDO? I work on local (the webserver is located:C:Inetpubwwwroot)
I'm not new about send email with CDONTS. But one thing I don't know.. How to send name of email sender with email. As All command I used to use is as follow.
Dim myMail Set myMail = CreateObject("CDONTS.NewMail") myMail.From="tom@hotmail.com" myMail.To="paul@hotmail.com" myMail.Subject="Hello :-)" myMail.BodyFormat=0 myMail.MailFormat=0 myMail.Body=HTML myMail.Send
when the reciever recieve email. Such as in hotmail box. It will show tom@hotmail.com as sender. But I want it to show name such as ...Tom Hariton not tom@hotmail.com But I don't know that command to add in the script.
I'm using godaddy ASP hosting and i have no permission to create files on disk from asp script.I need to generate excel file and send it via email in asp page.I'm sending email using CDONTS
All examples,i've found in internet, show how to attach to the email file from disk.In documentation for CDONTS told, that there is possibility to attach to the email data from IStream object.how can i implement this?
i am trying to create a simple page where a users can browse a file and send it through CDO. I can get the email to send fine with the body and subject but when it comes to figuring out the attachment bit, I'm lost! Here is the code i am using, please can someone point me in the write direction. Code:
I am using CDONTS to send email from an ASP script.
Attached to each of these emails is a 34K PDF file. 90% of the time the file arrives intact. 10% of the time, however, users are unable to open the file.
It appears that users using some sort of webmail recieve an improperly decoded version of the file where as users of POP3 non-web email clients (e.g. Outlook) generally recieve the file intact.
Thus far, all users reporting errors have up-to-date versions of Adobe Reader and are able to read the PDF file if I resend it from my desktop out of Outlook.
I have tried to open the files some users have reported problems with (after they forward me the copy they received) and I have the same problem. The file size on the PDF that could not be opened had grown to 47K.
how can i send reports of different client as email attachment.i've database in which the records of every client. the thing i want to do is the records of client send as email attacment in excel format or any other format.am using Access Database with Classsic ASP.
How I send e-mail with attachment image. I have made 2 file test.asp and test1.asp test.asp called test1.asp en attachement 2 images. It does not work because the attachment image.
How I can solve this problem. herewith my code (test.asp and test1.asp) ....
I have an email script that used to work but now doesn't, my web host told me I have to use CDOSYS instead of CDONTS.If it's not to much trouble could someone look at my script below and make it CDOSYS compliant.Thanks
<%@LANGUAGE="VBSCRIPT"%> <% Dim usxCDO Set usxCDO = Server.CreateObject("CDONTS.NewMail") usxCDO.From = cStr(Request("email")) usxCDO.To = "someone@somewhere.com" usxCDO.Subject = "Subscription To Magazine" usxCDO.Body = Chr(13) & Chr(10) &_ "Name: " & cStr(Request("name")) & Chr(13) & Chr(10) &_ "Company: " & cStr(Request("company")) & Chr(13) & Chr(10) &_ "Email: " & cStr(Request("email")) & Chr(13) & Chr(10) &_ "Instructions: " & cStr(Request("instructions")) & Chr(13) & Chr(10) &_ "A SUBSCRIPTION ORDER HAS BEEN PLACED." If (cStr(Request("Submit")) <> "") Then
I'm trying to convert this code and after several attempts at tutorials I am still scratching my head I am using XP pro IIS
Dim objCDO Set objCDO = Server.CreateObject("CDONTS.NewMail") body = body & " Your username is: " & user & vbCrLf body = body & " Your password is: " & PasswordTemp & vbCrLf
I am using Cdonts and CDOSYS to send email. Script runs without any error, but some of the reason I am not receiving any e mails. I am using window 2000 on exchange 2000 sercer, Code:
Is it necessary to set field configurations for CDOSYS?
I have yet to recode all my existing uses of CDONTS over to CDOSYS. In most of the sample code I've seen on the usual ASP sites, there is code to set field configurations for CDOSYS (usually using With... End With). However, in a number of CDOSYS-related code samples offered within this news group, the field configuration code is absent.