Problrms with decoding pdf file when iy goes as an attachment

Discussion in 'Perl Misc' started by Alla, Feb 16, 2006.

  1. Alla

    Alla Guest

    I would like to here any suggestions to work under code:
    It does not work proper: my body message coming as an attachment
    instead of sending a proper file.
    Thank you,
    Alla.

    print MAIL <<EOM;
    To: $realaddr
    Reply-To: $replyto
    Errors-To: $errorsto
    Sender: $sender
    Subject: $subject
    X-Mail-Gateway: Doug\'s WWW Mail Gateway $version
    X-Real-Host-From: $realfrom
    MIME-Version: 1.0
    Content-Type: application/pdf; name="EION_Ranger1030.pdf"
    Content-Transfer-Encoding:base64;
    Content-Disposition: attachment; filename="EION_Ranger1030.pdf"

    Dear $firstn $last,

    Thank you for your interest in EION Wireless.
    The information that you have requested can be downloaded by clicking
    on this link:
    $comp

    Should you need any further assistance, please do not hesitate to
    contact us
    at $sales or via telephone at +1 (613) 715-9067 x234.

    Thank you,
    The EION Wireless Team.
    ------------------------

    About EION:

    With the future of networks squarely pointed at Wireless,
    EION helps its customers design and deploy rugged point-to-point,
    point-to-multipoint,
    and WI-FI networks. EION's combination of carrier class IP experience,
    wireless
    networking skills, and security solutions to their clients. From
    isolated and inaccessible
    villages to congested and challenging urban environments, EION
    understand the obstacles
    these communities have with availability of communications services and
    connectivity, and
    has developed a Rugged Wireless Communication Solution (RWCS) to help
    overcome them.

    ------------------------


    EOM

    close(MAIL);
    }
     
    Alla, Feb 16, 2006
    #1
    1. Advertising

  2. Alla wrote:

    > I would like to here any suggestions to work under code:
    > It does not work proper: my body message coming as an attachment
    > instead of sending a proper file.
    > Thank you,
    > Alla.
    >
    > [...]


    If you need attachments in your mail, you need a multipart-message:

    To: $realaddr
    Reply-To: $replyto
    Errors-To: $errorsto
    Sender: $sender
    Subject: $subject
    X-Mail-Gateway: Doug\'s WWW Mail Gateway $version
    X-Real-Host-From: $realfrom
    MIME-Version: 1.0
    Content-Type: multipart/mixed;
    boundary="----=_NextPart_Of_Mail"

    This is a multi-part message in MIME format.

    ------=_NextPart_Of_Mail
    Content-Type: text/plain;
    format=flowed;
    charset="iso-8859-1";
    reply-type=original
    Content-Transfer-Encoding: 7bit

    [BODY_OF_YOUR_EMAIL_GOES_HERE]

    ------=_NextPart_Of_Mail
    Content-Type: application/pdf;
    name="EION_Ranger1030.pdf"
    Content-Transfer-Encoding: base64
    Content-Disposition: attachment;
    filename="EION_Ranger1030.pdf"

    [BASE64_ENCODED_PDF_GOES_HERE]

    ------=_NextPart_Of_Mail--


    If you want no attachment at all, you could use something like this:

    To: $realaddr
    Reply-To: $replyto
    Errors-To: $errorsto
    Sender: $sender
    Subject: $subject
    X-Mail-Gateway: Doug\'s WWW Mail Gateway $version
    X-Real-Host-From: $realfrom
    MIME-Version: 1.0
    Content-Type: text/plain;
    format=flowed;
    charset="iso-8859-1";
    reply-type=original
    Content-Transfer-Encoding: 7bit

    [BODY_OF_YOUR_EMAIL_GOES_HERE]


    It's an easy trick; just send an email to yourself and examine its
    source code.

    (P.S. You should use the 'Date: ' header too, I've seen spam filters
    that reject mail without 'Date: ')

    --
    Bart
     
    Bart Van der Donck, Feb 16, 2006
    #2
    1. Advertising

  3. Alla <> wrote:

    > I would like to here any suggestions to work under code:



    perldoc -q mail

    How do I use MIME to make an attachment to a mail message?


    > print MAIL <<EOM;
    > To: $realaddr
    > Reply-To: $replyto
    > Errors-To: $errorsto
    > Sender: $sender
    > Subject: $subject
    > X-Mail-Gateway: Doug\'s WWW Mail Gateway $version



    Where is Doug's program?

    There are lot's of buggy and insecure mail gateway programs, I
    thought I'd take a look at this one if I could find it.

    Five minutes of googling found only broken links...

    You do not need to escape the single quote because it is not meta.


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
     
    Tad McClellan, Feb 17, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. edwinek
    Replies:
    2
    Views:
    287
    Fredrik Lundh
    Aug 4, 2003
  2. Kyle Pula

    CDONTS - PDF Attachment / decoding problem

    Kyle Pula, Jul 25, 2003, in forum: ASP General
    Replies:
    2
    Views:
    150
    Kyle Pula
    Jul 28, 2003
  3. Ricardo Pog
    Replies:
    1
    Views:
    470
    Austin Ziegler
    Mar 26, 2008
  4. Sean Nakasone
    Replies:
    1
    Views:
    415
    Farrel Lifson
    Apr 14, 2008
  5. dkmd_nielsen
    Replies:
    1
    Views:
    191
    Gregory Brown
    Dec 15, 2009
Loading...

Share This Page