Professional Web Applications Themes

"CC" will not send any mail :-( - PERL Beginners

Hello once more :-), why does the CC-line not send any mail? The To-Line is well. And the CC-Line appears in the first mail. But there will not send any mail to the cc-address. What is there wrong? open ( MAIL , "|$mailprog -t") || die "Kann $mailprog nicht öffnen!\n"; print MAIL "To: s-mail\etikettenwelt.de\n"; # Dummy-Empfänger print MAIL "Cc: $zieladressen\n"; print MAIL "Subject: $thema-Anfrage\n"; print MAIL "From: $email\n"; print MAIL "Reply-to: $email\n"; print MAIL "Textline1\n\n"; print MAIL "Textline2\n\n"; -- Mit freundlichen Grüssen Reinhold -- To unsubscribe, e-mail: org For additional commands, e-mail: org <http://learn.perl.org/> <http://learn.perl.org/first-response>...

  1. #1

    Default "CC" will not send any mail :-(

    Hello once more :-),

    why does the CC-line not send any mail?
    The To-Line is well. And the CC-Line appears in the first mail. But
    there will not send any mail to the cc-address.

    What is there wrong?

    open ( MAIL , "|$mailprog -t") || die "Kann $mailprog nicht öffnen!\n";

    print MAIL "To: s-mail\etikettenwelt.de\n"; # Dummy-Empfänger
    print MAIL "Cc: $zieladressen\n";
    print MAIL "Subject: $thema-Anfrage\n";
    print MAIL "From: $email\n";
    print MAIL "Reply-to: $email\n";
    print MAIL "Textline1\n\n";
    print MAIL "Textline2\n\n";

    --
    Mit freundlichen Grüssen

    Reinhold



    --
    To unsubscribe, e-mail: org
    For additional commands, e-mail: org
    <http://learn.perl.org/> <http://learn.perl.org/first-response>


    Reinhold Guest

  2. #2

    Default Re: "CC" will not send any mail :-(

    On Fri, 10 Sep 2004, Reinhold Riedersberger wrote:
     

    Are all the variables, particularly $zieladdressen, defined ?

    What do the message headers on a mail sent to the To: line look like ?

    If you're hitting a dead end, this may be easier to do with a module
    like Mail::Simple or one of the newer Email::* ones.



    --
    Chris Devers
    Chris Guest

  3. #3

    Default Re: "CC" will not send any mail :-(

    Hallo Chris,
     

    Yes

     

    Return-path: <pureserver.info>
    Envelope-to: de
    Delivery-date: Fri, 10 Sep 2004 01:14:41 +0200
    Received: from [213.239.206.140] (helo=mx.cyconf.de)
    by mxng09.kundenserver.de with esmtp (Exim 3.35 #1)
    id 1C5Y7l-0003LE-00
    for de; Fri, 10 Sep 2004 01:14:41 +0200
    Received: from p15105822.pureserver.info (p15105822.pureserver.info [217.160.132.217])
    by mx.cyconf.de (Postfix) with ESMTP id 16BE714FD
    for <de>; Fri, 10 Sep 2004 01:15:48 +0200 (CEST)
    Received: (from web13localhost)
    by p15105822.pureserver.info (8.11.3/8.11.3/SuSE Linux 8.11.1-0.5) id i89NEf417569;
    Fri, 10 Sep 2004 01:14:41 +0200
    Date: Fri, 10 Sep 2004 01:14:41 +0200
    Message-Id: <pureserver.info>
    To: de

    CC: de <-- This mail will not be sent

    Subject: Barcodescanner-Anfrage
    From: de
    Reply-To: de


    --
    Mit freundlichen Grüssen

    Reinhold


    Reinhold Guest

  4. #4

    Default Re: "CC" will not send any mail :-(

    Reinhold Riedersberger wrote: 

    Do messages to those two addresses possibly end up in the same
    mailbox? In that case it may not be an error, but rather the way the
    receiving mail server has been configured to act.

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

  5. #5

    Default Re: "CC" will not send any mail :-(

    Reinhold Riedersberger wrote: 

    If there actually is a blank line between those headers, the CC:
    header (and everything after it) will be considered part of the
    message body, and not a message header.

    Does the $zieladressen string possibly start with a line break?

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

  6. #6

    Default Re: "CC" will not send any mail :-(

    On Fri, 10 Sep 2004, Reinhold Riedersberger wrote:
     
    >
    > Yes[/ref]

    Hmm.

    Well, for debugging, you could try inserting the variables you're using
    into the message body in an attempt to show exactly what's there:

    print MAIL <<EOMAIL;
    TO: s-mail\etikettenwelt.de
    Cc: $zieladdressen
    Subject: $thema-Anfrage
    From: $email
    Reply-to: $email

    Textline1
    Textline2

    Debugging:
    \$zieladdressen '$zieladdressen'
    \$email '$email'
    \$thema '$thema'
    \$mailprog '$mailprog'

    EOMAIL

    Note also that this merges all your print statements into one, which
    should be easier to read, less likely to introduce subtle typos, and
    may even be slightly faster to execute.

    As another poster noted, if the To and Cc addresses are the same mail
    box, the mail server software may merge things. It would be worth
    testing this with accounts on different mail systems.

    And if you really have spaces before & after the Cc line in the headers,
    that's broken -- but it looks like you just did that for illustration.



    --
    Chris Devers com
    http://devers.homeip.net:8080/blog/

    np: 'Christopher Lydon'
    by The Dresden Dolls
    from 'A Is For Accident'
    Chris Guest

  7. #7

    Default Re: "CC" will not send any mail :-(

    The code you have provided does not insert a blank line between the header data
    (from, to, cc, subject, etc) and the message body.

    This seems to cause your mailer to treat the whole message a 'message
    body' which
    is why the recipient gets an email with the 'CC' line separated from the header
    by a blank line.

    consider inserting
    print MAIL "\n";
    after the reply-to line.


    On Fri, 10 Sep 2004 01:47:56 +0200, Reinhold Riedersberger
    <de> wrote: 
    David Guest

Similar Threads

  1. Replies: 1
    Last Post: February 14th, 12:04 PM
  2. Setting Thunderbird as mail client in "Send to"
    By Gordon Burgess-Parker in forum Ubuntu
    Replies: 4
    Last Post: November 28th, 04:25 PM
  3. #25366 [NEW]: form buttons of type "image" dont send "submit" $_POST variable in IE
    By jordanolsommer at imap dot cc in forum PHP Development
    Replies: 0
    Last Post: September 2nd, 07:54 PM
  4. Replies: 3
    Last Post: August 5th, 06:17 PM
  5. "send mail" tutorial?
    By rnd in forum FileMaker
    Replies: 3
    Last Post: August 1st, 05:22 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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