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. <info@company.com> \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
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 = "<support@company.com>";
$subject = "Test";
$MsgHeader  = "From: COMPANY NAME. <info@worldatrading.com> \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
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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.