I was also under the impression that you had to end have an extra blank
line after the subject.

print MAIL "Subject:$subject\n\n";
                              ^^
I doesn't look like it's causing your current problem, but when you escape
the @'s you may find another error.


Dave

--
[EMAIL PROTECTED]

David C. Maple
V.P. Information Systems
Advanced Communications Group

  'The bigger it bloats, the harder it falls.'
                -- "The 48 Laws of Power" (R. Greene, J Elffers)

....

---------- Forwarded message ----------
Date: Sat, 18 Dec 99 21:40:08 +0100
From: Heiko Schmidhaeussler <[EMAIL PROTECTED]>
To: QMail List <[EMAIL PROTECTED]>
Subject: Re: qmail appending mail machines name to recipients

On Fri, 17 Dec 1999 17:05:29 -0500, clifford thurber wrote:

>Hello,
>I made a post earlier to this list open a PERL program I have written which
>basic opens one file handle ot a CSV file containing usernames and email
>adresses parses them and then sends users mail by writing to a file handle
>opened to qmail. Here is the snippet of code that achieves this:
>
>$mailprog = "/usr/local/var/qmail/bin/qmail-inject";
>
>open(MAIL, "|$mailprog");
>
>print MAIL "To: $email\n";
>print MAIL "From: $from\n";
>print MAIL "Subject:$subject\n";
>print MAIL "MIME-Version: 1.0\n";
>print MAIL "Content-Type: text\/html\; charset\=us-ascii\;
>name=\"newsl.html\"\n";
>print MAIL "Content-Transfer-Encoding: 7bit\n";
>print MAIL "Content-Disposition: inline\; filename=\"newsl.html\"\n";
>print MAIL "Content-Base: http:\/\/www\.liveuniverse\.com\n";
>
>
>print MAIL " etc .....
>close(MAIL);
>
>The problem is that every message is being bounced back b/c somewhere qmail
>is appending the name of our machine(snapper.raremedium.com) onto the
>recipients e-mail address. It then sees the name of our box and decideds
>this is a local delivery which is of course undeliverable as we are trying
>to send mail to a list of remote users. Can anyone help me with this. For
>instance below my script assigned the value  $email ="[EMAIL PROTECTED]"

In perl you have to escape the @-symbol in a string. So try this:

    $email="maletic\@usa.net"


HTH, Heiko.



Reply via email to