How Do I Use CDONTS.new To Send An Email With Attachment?
Can someone give me some sample code to use CDONTS.new to send email with an attachment?
I've got sample code from the following website;
http://msdn.microsoft.com/library/e...sp?frame=true
But, I'm having trouble GETTING the relevant field from my HTML form! I can't seem to be able to get the field property. It just comes up as a blank.
View Replies
ADVERTISEMENT
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.
Here is the code I am working with: Code:
View Replies
View Related
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.....
View Replies
View Related
how to restrict email attachment file type as well as file size? If anybody has idea about it.?
View Replies
View Related
Can any one give some ASP code to send an email with attachment.
View Replies
View Related
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
and in my code its at this point:.....
View Replies
View Related
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.
View Replies
View Related
i used the following script but it won't send the email. any suggestions why?
<%
Dim TBdy
Dim MyCDO
CR = Chr(13)
Set MyCDO = Server.CreateObject("CDONTS.NewMail")
MyCDO.From = "person@something.org"
MyCDO.To = "allstar@aol.com"
MyCDO.Subject = "collegebound info"
TBdy = Request.Form("cb_name")
MyCDO.Body = TBdy
MyCDO.Importance = 1 (Normal)
MyCDO.Send
Set MyCDO = nothing
%>
View Replies
View Related
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)
View Replies
View Related
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.
View Replies
View Related
I am trying to send and hyperlink thru my CDONTS email, does anybody know how to send hyperlink in CDONTS email,
View Replies
View Related
I'm having no luck sending an email message from an asp page with UTF-8 encoding so that Japanese characters can be correctly rendered.
View Replies
View Related
I work with asp and send email by cdonts and want to get in in 1255
ISO-Logical encoding.
every email i got the numbers shows backwords , i need to goto to
encoding and replace to ISO-Logical 1255
how to do it right?
View Replies
View Related
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?
View Replies
View Related
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:
View Replies
View Related
<%
Set theMail = server.CreateObject("CDONTS.NewMail")
theMail.From = "user -at- domain -dot- com"
theMail.To = "user -at- domain -dot- com"
theMail.Subject = "Requested Form"
theMail.AttachFile
("http://www.microsoft.com/library/toolbar/3.0/images/banners/ms_masthead_ltr.gif")
theMail.Body = "My email body"
theMail.Send
Set theMail = nothing
%>
That doesn't work :) Is that even possible?
View Replies
View Related
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.
Code is pasted below ....
View Replies
View Related
i need 2 files html as well as asp forms. pls help me with working code.
View Replies
View Related
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.
View Replies
View Related
How I send e-mail with attachement image. I send e-mail with cdo.message. but I have deffiecult to send attachment image.
Here is my code: ....
View Replies
View Related
<FORM id=FORM1 name=FORM1 action=Upload.asp method=post
encType=multipart/form-data>
File 1:<INPUT type=file name=FILE1>
Description 1:<INPUT name=DESCR1><BR>
<INPUT type=submit value=Upload!>
</FORM>
How to attach the file selected in Input type=file .
how to attach that file & send mail using CDO in ASP..
View Replies
View Related
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) ....
View Replies
View Related
I am sending email using CDO. I want to send attachment through email.For that I have to send my file to webserver first then have to write path of file in CDO code.what is the best method developer's using for the same?Would you please send some component so that from local m/c I can upload desire file to webserver and consequently can attach that file into email.
View Replies
View Related
I am sending email using CDO. I want to send attachment through email.For that I have to send my file to webserver first then have to write path of file in CDO code.what is the best method developer's using for the same?Would you please send some component so that from local m/c I can upload desire file to webserver and consequently can attach that file into email.
View Replies
View Related
I want the users to be able to send an email with an attachment from my web page. The problem is that the file ".DOC" resides on the client machine and not the server. It would be ideal if the user could browse for the file.
Can someone tell me if this is possible and how? Do I have to first upload the document before adding it to the email as an attachment.
View Replies
View Related
Anybody can teach me beginning how to write a asp with attachment file?
Example I have a form as below:-
Name :
Address :
Tel :
Email :
Attachment photo :
I would like received mail can get all this info.
View Replies
View Related
i have pbm, all the values from first form is passed to the asp form including the path of the file attachment, through local host it is well running if i upload files in remote server and process then error is generated could anybody help this out Code:
...
stratt = Request.QueryString("f_path")
With objCDOMail
Set .Configuration = objConfig
.From = strFromEmailAddress
.To = strToEmailAddress
'.Cc = strCcEmailAddress
'.Bcc = strBccEmailAddress
.Subject = "Enquiry sent from enquiry form on website"
'.HTMLBody = strHTML
.TextBody = strBody
.AddAttachment stratt (path)
.Send
End With
View Replies
View Related
error '80004005'
Unspecified error
when sending an attachment, how do i debug this?
i found out that by default, ASP apps can only access files that are on the computerthat the server runs on. how can i change this so the IIS will take the files off the client's computer?
View Replies
View Related
I want to write ASP code to send email with file attachment
by using CDONTS . I searched from internet but i'm still confused
about the mechanism and code they writing in ASP.NET
Anyone doing this before can give me a hand such as instruction or sample code for example.
View Replies
View Related
I have a CDO mail script in JScript that works fine if I send the message without an attachment. However, I haven't been able to figure out how to attach a file without getting an error. Does anyone know how to attach a file to a CDO message in JScript?
<%@language="JScript" %>
<%
var cdoConfig = Server.CreateObject("CDO.Configuration");
cdoConfig.Fields("cdoSMTPServerName") = "12.34.56.78";
var cdoMessage = Server.CreateObject("CDO.Message");
cdoMessage.Configuration = cdoConfig;
var cdoBodyPart = cdoMessage.BodyPart;
cdoBodyPart.ContentTransferEncoding = "8bit";
cdoMessage.To = "name@company.com";
cdoMessage.From = "someone@mail.org";
cdoMessage.Subject = "CDO Test in JScript";
cdoMessage.TextBody = "This is a test email sent using JScript.";
cdoMessage.send();
%>
I've tried adding each of the following lines, but none of them works.
cdoMessage.AddAttachment "c:filesdocument.txt";
cdoMessage.AddAttachment( "c:filesdocument.txt" );
cdoMessage.Attachments.Add "c:filesdocument.txt";
cdoMessage.Attachments.Add( "c:filesdocument.txt" );
cdoMessage.AttachFile "c:filesdocument.txt";
cdoMessage.AttachFile( "c:filesdocument.txt" );
View Replies
View Related
I have a form that i have created and i need it to that the user can attach a file then get the form to send the file. Please have a look at my current code:
View Replies
View Related
I have a asp form which has a file field and a Send email button. I want user to use the file field to select an attachment path to be send out as email. How can I do that?
View Replies
View Related
I have a form that i have created and i need it to that the user can attach a file then get the form to send the file. Code:
View Replies
View Related