Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 4th, 2003, 01:01 PM
Authorized User
 
Join Date: Jun 2003
Location: , , .
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Default mailing list using php

Hello all,

I have created a mailing list that will take a persons name, email and send a copy to myself and also send a copy of the email to them thanking them for joining or subscribing to the list.

Now the question that I have is, I do not want to receive the same email as the user(which is the thank you for joing email) all I want is the username and email. The only reason why I receive the same email is because I have my address as the bcc:. Here is the code.

<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr><td width="10%"> </td>
        <td width="80%">
        <br>
        <h1 align="center">Thank you!</h1>
      <p align="center"> We've received your request to join our
        mailing list for <? echo ("<b>".$status."</b>"); ?>.<br>
        Please <a href="index.html">click here</a> to return to the home page.</p>
      <p></p>
      <?
$recipient .= $email;
$subject = $status. " Mailing list";

//$message .= "<h3>From: ".ucwords(strtolower($name))."</h3>"; Remove comment if you would like to see the applicant's name on email
$message .= "<table border='0'><tr><td>Dear ".$name.", <br>Thank you for joining our ".$status." mailing list.<Br> Hope you like it.</td></tr><tr><td>Please confirm your e-mail address is correct, if not please re-submit your request with the correct e-mail address.<br><a href='mailto:".ucwords(strtolower($name)).rawurlen code(" <").strtolower($email).rawurlencode(">")."?subject =Re:%Mailing%list%'>Email: ".strtolower($email)."</a></td></tr> \n";
$message .= "<tr><td><BR><BR><b>This is an automated response, please do not reply to this message</b></td></tr></table> \n";

$message .= "<tr><td><b>Comments:</b> ".$comments."</td></tr></table>\n";


$headers .= "From: ".$Name." <".strtolower($email).">\n";
$headers .= "bcc: <my email address>\n";
$headers .= "X-Sender: <my email address>\n";
$headers .= "X-Mailer: PHP\n"; // mailer
$headers .= "X-Priority: 1\n"; // Urgent message!
$headers .= "Return-Path: <my email address>\n"; // Return path for errors

/* If you want to send html mail, uncomment the following line */
$headers .= "Content-Type: text/html; charset=iso-8859-1\n"; // Mime type

mail($recipient, $subject, $message, $headers);
?>
        </td>
        <td width="10%"> </td>
    </tr>
</table>

The code is actually workign wonderfully, I just want ideas on how I can avoid getting the same email as the user.
if anyone can help me I would greatly appreciate it, and thank you.
Reply With Quote
  #2 (permalink)  
Old June 4th, 2003, 02:50 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Wien, Wien, Austria.
Posts: 158
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to NotNowJohn
Default

You have to call again mail function event without headers info (if you want only user/email info from user).
par example:
mail($your_email_address, "Mailing list's username/email values", $message);

$message="Email:" . $email . "\n";
$message.="Username:" . $username ."\n\n";

etc.

HTH.

Reg,
NotNowJohn

...but the Soon is eclipsed by the Moon
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
About Mailing List ssomchai BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 May 5th, 2008 10:05 PM
Mailing List Carriemh Beginning PHP 2 September 2nd, 2006 07:17 AM
Add Mailing List Problem USADarts BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 August 11th, 2004 10:19 PM
Newsletter Mailing List Manager PySpencer Beginning PHP 6 December 21st, 2003 07:13 PM
Mailing list module has error - HELP drfunkie BOOK: ASP.NET Website Programming Problem-Design-Solution 3 September 8th, 2003 12:09 PM



All times are GMT -4. The time now is 03:30 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.