i damaged a "Roll my own emailer"

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dave Kelly

    i damaged a "Roll my own emailer"

    This is the header of the email I am trying to send. My 'ReplyTo' is
    not working as planed/

    I tried googling thsi and did not get a good answer. I examed the code
    before, as suggested and tried the example below. No joy

    require("class. phpmailer.php") ;
    $mail = new PHPMailer();
    $mail->IsSMTP(); // telling the class to use SMTP
    $mail->Host = "smtp.xxxxxxxx. com"; // SMTP server
    $mail->Username = "daveekelly1@xx xxxxxx.com";
    $mail->Password = "ironnail";
    $mail->FromName = "Dave Lemke <dlemke@xxxxxxx x.net>";
    $mail->From = "Dave Lemke <dlemke@xxxxxxx x.net>";
    Line 34 $mail->ReplyTo = "dlemke@xxxxxxx x.net hcrofton@goodlo ops.com
    aged_sage@hotma il.com daveekelly1@xxx xxxxx.com";
    $mail->Cc = "daveekelly1@xx xxxxxx.com";
    $mail->Sender = "aged_sage@xxxx xxxx.com";
    $mail->ReturnReceiptT o = "daveekelly1@xx xxxxxx.com";
    $mail->AddAddress(" {$_SERVER['argv'][1]}");






    $mail->ReplyTo = "dlemke@xxxxxxx x.net", "crofton@gosodl oops.com", "
    aged_sage@hotma il.com", " daveekelly1@xxx xxxxx.com";
    Gives me this error:
    Parse error: parse error, unexpected ',' in /root/tffwebsite/
    membershipmaile r/mailsender.php on line 34

    $mail->ReplyTo = "dlemke@xxxxxxx x.net" " hcrofton@goodlo ops.com"
    "aged_sage@hotm ail.com" "daveekelly1@xx xxxxxx.com";
    Gives me this error:
    Parse error: parse error, unexpected T_CONSTANT_ENCA PSED_STRING in /
    root/tffwebsite/membershipmaile r/mailsender.php on line34

    $mail->ReplyTo = 'dlemke@xxxxxxx x.net' 'hcrofton@goodl oops.com' '
    aged_sage@hotma il.com' ' daveekelly1@xxx xxxxx.com";
    Gives me this error:
    Parse error: parse error, unexpected T_CONSTANT_ENCA PSED_STRING in /
    root/tffwebsite/membershipmaile r/mailsender.php on line34

    Earlier this morning I tried several 'Cc' but that did not work. Don't
    right now remember if it just did not work or if I got an error.

    I can get everything to work if I only use one name at a time. But I
    have 320 people to send this Message to and I want all replies to go
    to 3 different people and myself.

    My brain hurts. Can someone hit me on the head again.

    TIA
    Dave
  • Gordon Burditt

    #2
    Re: i damaged a &quot;Roll my own emailer&quot;

    >$mail->ReplyTo = "dlemke@xxxxxxx x.net", "crofton@gosodl oops.com", "
    >aged_sage@hotm ail.com", " daveekelly1@xxx xxxxx.com";
    >Gives me this error:
    >Parse error: parse error, unexpected ',' in /root/tffwebsite/
    >membershipmail er/mailsender.php on line 34
    The string concatenation operator is period, not comma.
    Also, you don't want to concatenate those strings as-is: you need
    spaces between them in the assembled string.

    I suggest:
    $mail->ReplyTo = "dlemke@xxxxxxx x.net crofton@gosodlo ops.com "
    .. "aged_sage@hotm ail.com daveekelly1@xxx xxxxx.com ";

    Note trailing spaces (not really required on the last line).

    Either that, or put the whole huge string on one line.

    Comment

    • Jerry Stuckle

      #3
      Re: i damaged a &quot;Roll my own emailer&quot;

      Dave Kelly wrote:
      This is the header of the email I am trying to send. My 'ReplyTo' is
      not working as planed/
      >
      I tried googling thsi and did not get a good answer. I examed the code
      before, as suggested and tried the example below. No joy
      >
      require("class. phpmailer.php") ;
      $mail = new PHPMailer();
      $mail->IsSMTP(); // telling the class to use SMTP
      $mail->Host = "smtp.xxxxxxxx. com"; // SMTP server
      $mail->Username = "daveekelly1@xx xxxxxx.com";
      $mail->Password = "ironnail";
      $mail->FromName = "Dave Lemke <dlemke@xxxxxxx x.net>";
      $mail->From = "Dave Lemke <dlemke@xxxxxxx x.net>";
      Line 34 $mail->ReplyTo = "dlemke@xxxxxxx x.net hcrofton@goodlo ops.com
      aged_sage@hotma il.com daveekelly1@xxx xxxxx.com";
      $mail->Cc = "daveekelly1@xx xxxxxx.com";
      $mail->Sender = "aged_sage@xxxx xxxx.com";
      $mail->ReturnReceiptT o = "daveekelly1@xx xxxxxx.com";
      $mail->AddAddress(" {$_SERVER['argv'][1]}");
      >
      >
      >
      >
      >
      >
      $mail->ReplyTo = "dlemke@xxxxxxx x.net", "crofton@gosodl oops.com", "
      aged_sage@hotma il.com", " daveekelly1@xxx xxxxx.com";
      Gives me this error:
      Parse error: parse error, unexpected ',' in /root/tffwebsite/
      membershipmaile r/mailsender.php on line 34
      >
      $mail->ReplyTo = "dlemke@xxxxxxx x.net" " hcrofton@goodlo ops.com"
      "aged_sage@hotm ail.com" "daveekelly1@xx xxxxxx.com";
      Gives me this error:
      Parse error: parse error, unexpected T_CONSTANT_ENCA PSED_STRING in /
      root/tffwebsite/membershipmaile r/mailsender.php on line34
      >
      $mail->ReplyTo = 'dlemke@xxxxxxx x.net' 'hcrofton@goodl oops.com' '
      aged_sage@hotma il.com' ' daveekelly1@xxx xxxxx.com";
      Gives me this error:
      Parse error: parse error, unexpected T_CONSTANT_ENCA PSED_STRING in /
      root/tffwebsite/membershipmaile r/mailsender.php on line34
      >
      Earlier this morning I tried several 'Cc' but that did not work. Don't
      right now remember if it just did not work or if I got an error.
      >
      I can get everything to work if I only use one name at a time. But I
      have 320 people to send this Message to and I want all replies to go
      to 3 different people and myself.
      >
      My brain hurts. Can someone hit me on the head again.
      >
      TIA
      Dave
      >
      The ReplyTo is a comma separated list of email addresses. You need the
      commas - but everything needs to be within one string, i.e. (pardon the
      line wrap)

      $mail->ReplyTo = "dlemke@xxxxxxx x.net, crofton@gosodlo ops.com,
      aged_sage@hotma il.com, daveekelly1@xxx xxxxx.com";

      And BTW - when using example domains, please use example.net,
      example.com, etc. Those are specifically reserved for such usage.

      --
      =============== ===
      Remove the "x" from my email address
      Jerry Stuckle
      JDS Computer Training Corp.
      jstucklex@attgl obal.net
      =============== ===

      Comment

      • Dave Kelly

        #4
        Re: i damaged a &quot;Roll my own emailer&quot;

        On Sep 11, 8:05 am, Jerry Stuckle <jstuck...@attg lobal.netwrote:
        The ReplyTo is a comma separated list of email addresses. You need the
        commas - but everything needs to be within one string, i.e. (pardon the
        line wrap)
        >
        $mail->ReplyTo = "dle...@xxxxxxx x.net, crof...@gosodlo ops.com,
        aged_s...@hotma il.com, daveekel...@xxx xxxxx.com";
        >
        And BTW - when using example domains, please use example.net,
        example.com, etc. Those are specifically reserved for such usage.

        The line wrap was due to the constraints of the email format.
        I tried both examples and neither works. Thanks fo the feedback. I
        will work around this problem.

        As for 'example.net' I learn something everyday. Thanks for that also.

        Dave

        Comment

        • Jerry Stuckle

          #5
          Re: i damaged a &quot;Roll my own emailer&quot;

          Dave Kelly wrote:
          On Sep 11, 8:05 am, Jerry Stuckle <jstuck...@attg lobal.netwrote:
          >
          >The ReplyTo is a comma separated list of email addresses. You need the
          >commas - but everything needs to be within one string, i.e. (pardon the
          >line wrap)
          >>
          >$mail->ReplyTo = "dle...@xxxxxxx x.net, crof...@gosodlo ops.com,
          >aged_s...@hotm ail.com, daveekel...@xxx xxxxx.com";
          >>
          >And BTW - when using example domains, please use example.net,
          >example.com, etc. Those are specifically reserved for such usage.
          >
          >
          The line wrap was due to the constraints of the email format.
          I tried both examples and neither works. Thanks fo the feedback. I
          will work around this problem.
          >
          As for 'example.net' I learn something everyday. Thanks for that also.
          >
          Dave
          >
          Dave, the code I gave you puts the ReplyTo string in the correct format.
          If that's what you're using, your problem lies somewhere else.

          --
          =============== ===
          Remove the "x" from my email address
          Jerry Stuckle
          JDS Computer Training Corp.
          jstucklex@attgl obal.net
          =============== ===

          Comment

          Working...