Error in sending "attachment"........

Results 1 to 3 of 3

Thread: Error in sending "attachment"........

  1. #1
    santosh kumar Guest

    Default Error in sending "attachment"........

    Hello, <BR> i made a compose box to send emails using CDONTS, but I am getting problem sending attachment from it.It gives a error message of "Unspecified Error" whenever i attach a file. <BR><BR>The code is as follows: <BR><BR>&#060;%@ Language=VBScript %&#062; <BR>&#060;%Option Explicit%&#062; <BR>&#060;% <BR>dim attach <BR>dim objSendMail <BR><BR>attach=Server.HTMLEncode(Request.Form("res ume")) <BR><BR>set objSendMail=Server.CreateObject("CDONTS.NewMail") <BR>with objSendMail <BR><BR>objSendMail.To="" <BR> .From="" <BR> .Subject="Submission of resume" <BR> .Body="I&#039m submitting my resume"& vbNewLine &"Please <BR> Go through my attached resume ." <BR> .Cc="" <BR> .bcc="" <BR> .Importance=2 <BR> .AttachFile attach,"Resume attached" <BR> .Send <BR>end with <BR><BR>Please gothrough the code and help me to solve the problem. <BR><BR>regards, <BR>SANTOSH

  2. #2
    Join Date
    Dec 1969

    Default RE: Error in sending

    Does the data in the variable &#039attach&#039 represent a filename on the server? Or does it represent the actual data of the resume?

  3. #3
    Join Date
    Dec 1969

    Default RE: Error in sending

    This method has three parameters. <BR><BR>The first parameter is Source, of type String or Istream object. This parameter is required, and *must contain the full path and file name* of the attachment. Only C/C++ and Java programs can use an Istream object. <BR><BR>The second (optional) parameter is FileName, of type String. This provides a file name to appear in the attachment&#039s placeholder in the message. If not specified, the file name from the Source parameter is used. <BR><BR>The third (optional) parameter is EncodingMethod, of type Long, which indicates the encoding of the attachment. There are two possible values: 0, meaning the attachment is in UUEncode format; and 1, indicating the attachment is in Base64 format. (Base64 is the encoding scheme defined by MIME; UUEncode is an older format that you should use if you suspect your recipient(s) may not have a MIME-compliant system.) The default value of this parameter depends upon the MailFormat property. If the MailFormat property is set to 1, the default value of EncodingMethod is 0. If the MailFormat property is set to 0, the default value of EncodingMethod is 1.<BR><BR>Regards,<BR>Rob

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts