I have searched this board for an answer to my questions, and there where already posted some threads about multiple mails, but none of them answered my qeustion really, so I thank anyone who would be as nice as to take the time to help me out.
I have made some code to send a certain photo as an ecard to a certain email adres. In the form, you also add your own email, and you can choose to receive a copy of the ecard you are sending.
The person the e-card is sent to receives te mail perfectly. The copy needs to be the same, exept for one link wich with the user of the e-mail adres the ecard was sent to can block any next e-cards form my site, so i run the mail function twice.
There is a copy sent to the emailadress of the sender, properly in HTML and with the right subject, but somehow the message contains only a slight part of the html code it should contain, thus showing an empty message. It stops suddenly in the midst of an </style> tag. The variable containing the html is absolutely correct (checked with echo).
So I dont know what to do... this is my code:

  $mail_ontv = $_POST[email2];
	$onderwerp = "Een e-card van " . $_POST[naam1] . " voor jou";
	$onderwerpkopie = "Een e-card van " . $_POST[naam1] . " voor jou (Kopie voor verzender)";
	$inhoud_mail = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">";
	...
	$inhoud_mail .= "</html>";
	$inhoud_mail_kopie = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">";
	...
	$inhoud_mail_kopie .= "</html>";

mail($mail_ontv, $onderwerp, $inhoud_mail, 
"From: $_POST[naam1] <$_POST[email1]>\n".
"MIME-Version: 1.0\n".
  "Content-type: text/html; charset=iso-8859-1");
	if ($_POST[kopie] == 1) {
   mail($_POST[email1], $onderwerpkopie, $inhoud_mail_kopie, 
	 "From: SValkenier <stephan@svalkenier.nl>\n".
	 "MIME-Version: 1.0\n".
   "Content-type: text/html; charset=iso-8859-1");
}

    Are you using wordwrap() or something to wrap the lines? There is a limit of the number of characters a line can contain I believe. Not sure, but I would try using [man]wordwrap/man to insert a break after every... 255 characters? I'm not sure on the limit, if it even exists.

    Someone back me up on this one?

      I am not using wordwrap, though I will try. I am not sure it will work because the first mail is send properly and contains the same code plus 1 line, it's actually longer...

        It sounds like you found a working solution to your issue. If this is the case, please remember to MARK THIS THREAD RESOLVED using the link at the bottom of the page.

          Write a Reply...