in reply to Mail::Sender problem

How are you formatting your message? Are you sending one block of "multi-line" text directly to the 'Send' method? Maybe you just need to split your string into an array of lines (minus newlines) and pass the resulting string to the SendLine method, which will correctly add the proper newline sequence to each line. See the documentation for Mail::Sender for details.

An alternative is the SendEx method, which will go through your string and convert your bad newline sequences to proper SMTP newlines. Again, see the documentation. It's pretty clear on this topic.

Replies are listed 'Best First'.
Re: Re: Mail::Sender problem
by fuzzysteve (Beadle) on Dec 11, 2001 at 06:06 UTC
    The code is in my scratchpad $message is a multiline string

      Since you're using the MailMsg method, you have to fix your newlines beforehand.

      $message =~ s{\n}{\012\010}g;
        I suspected something like that, though i thought the function would split the message up.

        Thanks for the help