[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Can't get sendmail to put subject right...



My wife is an eBay seller, and I have been creating some perl scripts to
assist her. I do have a problem that is email associated that maybe
someone could help me over. Snippet included:

# auction_desc = "This item for sale       Item #12345"

    $auction = $test_data{'auction_desc'};
    chomp($auction);
    $auction_full = $auction;     # used for subject
 $auction =~ /(.*)(Item #)(\d+)/;   # segment the description and item
number
 $auction_desc = $1;
 $auction_ID = $3;
 $auction_desc =~ /(.*)(\r|\n)/;
 $auction_desc = $1;
 chomp($auction_desc);

# the problem is that $auction_full ends up without the id number.
$auction_desc & $auction_ID work as expected.
# I tried to append the id, but that also fails.
 $auction_full .= $auction_ID;

 print qq{
  <a
href="mailto:$bidder_email?subject=$auction_full&message=Hello">eMail
Winner</a>
 };

# when the link is clicked, a message window opens (this is what I want)
but the subject is truncated at "Item "
# is something "thinking" the #12345 indicates a comment, and so strips
it?
# second - how does one fill in the message body? add \n\ntext to the
subject?

Thanks for helping!

Terry


# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org