Jump to content

sendmail question


shadiadiph

Recommended Posts

How can i add a bcc section to this sendmail code?

 

$to = "$emailclient";
$subject = "$subj";
$MsgHeader = "From: COMPANY NAME. <[email protected]> \n";
$MsgHeader .= "MIME-Version: 1.0\n";
$MsgHeader .= "Content-type: text/html; charset=iso-8859-1";
$MsgBody = "
<html>
<head>
<title>HTML message</title>
</head>
<body>


hello


</body>
</html>";
mail($to, $subject, $MsgBody, $MsgHeader);

Link to comment
https://forums.phpfreaks.com/topic/142080-sendmail-question/
Share on other sites

mm i have been using things from php.net the examples do not seem to work

 

the one i have been using is like this it works some of the time but not all the time 50-50 sometimes people don't get my emails?

 

$to = "<[email protected]>";
$subject = "Test";
$MsgHeader  = "From: COMPANY NAME. <[email protected]> \n";
$MsgHeader .= "Bcc: <$emailadvisor> \n";
$MsgHeader .= "MIME-Version: 1.0\n";
$MsgHeader .= "Content-type: text/html; charset=iso-8859-1";
$MsgBody = "
<html>
<head>
<title>HTML message</title>
</head>
<body>


hello


</body>
</html>";
mail($to, $subject, $MsgBody, $MsgHeader);

 

does anyone have one that works 99% of the time?

Link to comment
https://forums.phpfreaks.com/topic/142080-sendmail-question/#findComment-744114
Share on other sites

Hmm, if you mean by 50% of the people you send it to recieve it 100% of the time, then it may be compatiblity issues, try using CC: instead of BCC.

 

If, however you mean 100% of the people only get it 50% of the time, then im not so sure its php's fault, i've only developed on a windows machine so i couldnt help you with sendmail.

 

unless your using SMTP, especially free smtp servers can be very frustrating on a development machine.

Link to comment
https://forums.phpfreaks.com/topic/142080-sendmail-question/#findComment-744117
Share on other sites

Mail is *not* reccommended for Large news groups;

 

Alternatives to the Sendmail program: (nothing to do with php)

qMail

Postfix

 

Alternatives to mail() function: (everything to do with php)

PEAR::Mail  - http://www.hudzilla.org/phpbook/read.php/15_5_2

PHP Mailer Class - http://phpmailer.codeworxtech.com/

 

The PHP Mailer class is a giant mail classfile that is there to make our life easier - it cotains pretty much all the functions you will ever need with mailing.

 

PEAR::Mail;

PEAR's Mail package defines an interface for implementing mailers under the PEAR hierarchy. It also provides supporting functions useful to multiple mailer backends. Currently supported backends include: PHP's native mail() function, sendmail, and SMTP. This package also provides a RFC822 email address list validation utility class.

Link to comment
https://forums.phpfreaks.com/topic/142080-sendmail-question/#findComment-744598
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.