Results 1 to 4 of 4
  1. #1

    perl mutt emails

    I need help emailing from a perl script.
    I want to get addresses from a database and send out emails using mutt. Getting the addresses is fine, but am having difficulty composing the messages. I have checked all man pages I can find but all assume I am working form a terminal.

    I wnat to do something like
    `mutt -s test -i mail.txt $email`
    any help much appreciated.

  2. #2
    >I wnat to do something like
    >`mutt -s test -i mail.txt $email`
    > any help much appreciated.

    what you want to do is open a pipe to mutt

    open MUTT,"|mutt -s test $email" or die "cannot open pipe to mutt: $!\n";
    print MUTT $message;
    close MUTT or die "not right: $?\n";

  3. #3
    Thanks that is excellent. Much better looking than the solution I had stumbled across. It looks ok here I guess but when its supposed to be indented... sucky.

    `mutt -s "uni assignment - disregard" $email <<EMAIL
    big blocks
    of text
    as the
    email
    EMAIL`;

  4. #4
    it has been my pleasure.

    *curtsy*

Posting Permissions

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