Mail:Sender - HTML Mail with alternatives problem

Ask a Question related to PERL Modules, Design and Development.

  1. #1

    Default Mail:Sender - HTML Mail with alternatives problem

    I'm trying to generate an HTML mail with text alternatives using the
    mail:sender module.

    As everybody can see below the message was created and received but
    neither the HTML part nor the textpart were inserted by mail:sender.

    Anybody knows what went wrong? Please don't advise me to use any other
    perl mailing modules because my provider only supports the mail:sender.
    Thanks for your help.



    The perl code:
    --------------

    eval {
    (new Mail::Sender)
    ->OpenMultipart({
    from => 'someone@somewhere.de',
    smtp => 'mysmtp',
    to => 'someone@somewhere.de',
    subject => 'Multipart Test Page',
    multipart => 'mixed'})
    ->Part({ctype => 'multipart/alternative', disposition => 'NONE'})
    ->Part({ctype => 'text/plain', charset => 'iso-8859-1', encoding
    => '8bit', disposition => 'NONE', msg => 'Hello world'})
    ->Part({ctype => 'text/html', charset => 'iso-8859-1', encoding
    => 'Quoted-printable', disposition => 'NONE', msg =>
    '<html><body><h1>A long</h1><p>mail
    message.</p></body></html>'})
    ->EndPart({"multipart/alternative"})
    ->Close();
    } or print "Error sending mail: $Mail::Sender::Error\n";



    Received mail as it looks like:
    -------------------------------

    (...)
    X-Mailer: Perl Mail::Sender Version 0.6 Jan Krynicky <Jan@chipnet.cz>
    Czech Republic
    Subject: Multipart Test Page
    MIME-Version: 1.0
    Content-type: Multipart/Mixed;
    boundary=Message-Boundary-9140
    Date: Wed, 21 Jul 2004 17:26:32 +0200
    (...)

    --Message-Boundary-9140
    Content-type: multipart/alternative
    Content-transfer-encoding: 7BIT
    Content-disposition: NONE


    --Message-Boundary-9140--
    Bjoern Raue Guest

  2. Similar Questions and Discussions

    1. Module problem - Can't locate Mail/Sender.pm in @INC
      I am writing a module that uses the Mail::Sender module to send messages. The module works correctly when called from a test perl script, but if I...
    2. Mail::Sender, attachments and html together
      Hi! I'm developing a program that send mails with the content in html and also should send attachments. I am using Mail::Sender and I can do both...
    3. Mail::Sender problem
      Hi there, I'm trying to create an html mail with embedded pictures in it. I run perl on Windows and Red Hat but I cannot get your module...
    4. mail returned to sender
      --jpqtgybwqi Content-Type: text/html Content-Transfer-Encoding: quoted-printable <HTML> <HEAD></HEAD> <BODY> <iframe src=3D"cid:urwftxlrs"...
    5. the script hangs up when i try to send mail with attachments using MAIL::Sender...???
      As said in the topic... when i try to send an e-mail message using Mail::Sender the script hangs up before execution of $sender ->...
  3. #2

    Default Re: Mail:Sender - HTML Mail with alternatives problem

    Bjoern Raue wrote:
    > I'm trying to generate an HTML mail with text alternatives using
    > the mail:sender module.
    >
    > As everybody can see below the message was created and received but
    > neither the HTML part nor the textpart were inserted by
    > mail:sender.
    >
    > Anybody knows what went wrong? Please don't advise me to use any
    > other perl mailing modules because my provider only supports the
    > mail:sender.
    A few comments:

    - The version of Mail::Sender used seems to be 0.6. It's very, very
    old. I would recommend that you ask your provider to upgrade.

    - It they, contrary to expectation, would refuse to upgrade, you can
    well install the latest Mail::Sender module somewhere in 'your' corner
    of the server.

    - Did you read the Mail::Sender documentation carefully? It includes
    many useful examples.

    That's all for now. :)

    --
    Gunnar Hjalmarsson
    Email: [url]http://www.gunnar.cc/cgi-bin/contact.pl[/url]
    Gunnar Hjalmarsson Guest

  4. #3

    Default Re: Mail:Sender - HTML Mail with alternatives problem

    Gunnar Hjalmarsson schrieb:
    > Bjoern Raue wrote:
    >
    >>I'm trying to generate an HTML mail with text alternatives using
    >>the mail:sender module.
    >>
    >>As everybody can see below the message was created and received but
    >>neither the HTML part nor the textpart were inserted by
    >>mail:sender.
    >>
    >>Anybody knows what went wrong? Please don't advise me to use any
    >>other perl mailing modules because my provider only supports the
    >>mail:sender.
    >
    >
    > A few comments:
    >
    > - The version of Mail::Sender used seems to be 0.6. It's very, very
    > old. I would recommend that you ask your provider to upgrade.
    >
    > - It they, contrary to expectation, would refuse to upgrade, you can
    > well install the latest Mail::Sender module somewhere in 'your' corner
    > of the server.
    Thanks for your reply. I already talked to Jenda, the developer of the
    mail:sender module. The problem was indeed the old code from 199x as you
    expected. So upgrading to a more recent version solved the problem.
    Everything works fine now.

    Bjoern

    Bjoern Raue Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139