Jump to content

Search the Community

Showing results for tags 'mailer'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 3 results

  1. I believe the solution the my problem should be simple I feel that it's staring me right in the face. I have a Cron Job that sends an email message to users who's bill "due date" falls on the current date. I want to make the email more personalized and say: Dear John Doe: You have the following bills due today: Rent Cable Internet Please login to pay your bills Thanks,. Here's my following PHP code <?php header("Content-type: text/plain"); // OPEN DATA BASE define("HOSTNAME","localhost"); define("USERNAME",""); define("PASSWORD",""); define("DATABASE",""); mysql_connect(HOSTNAME, USERNAME, PASSWORD) or die("Connetion to database failed!"); mysql_select_db(DATABASE); joinDateFilter(); // BILL QUERY function joinDateFilter(){ $query = mysql_query("SELECT bills.billname, bills.duedate, bills.firstname, bills.email, bills.paid FROM bills JOIN users ON bills.userid=users.userid WHERE DATE(bills.duedate) = CURDATE() AND bills.PAID != 'YES'"); $mail_to = ""; while ($row = mysql_fetch_array($query)){ echo $row['firstname']." - ".$row['email']."\n"; $mail_to = $row['email'].", "; } if (!empty($mail_to)){ sendEmail($mail_to); } } // SEND EMAIL function sendEmail($mail_to) { $from = "MyEmail@myemail.com"; $message = "Dear " . $row['firstname'].", <br><br>" ."You have the following bills due today.<br><br>" .$row['billname']. "<br><br>" ."Please login to pay your bills"; $headers = 'From: '.$from."\r\n" . 'Reply-To:'.$_POST['email']."\r\n" . "Content-Type: text/html; charset=iso-8859-1\n". 'X-Mailer: PHP/' . phpversion(); mail($mail_to, "Today is your due date", $message, $headers); } ?>
  2. Alright so I have 3 pages. Signup, Password reset and Send message. All three pages/forms email to the recipient. So far my test have only been with hotmail and gmail. All emails go through for hotmail accounts. They show up in the hotmail. All emails DO go through for gmail accounts. But they don't show up in the gmail. The only page that gmail is able to receive emails from is "send message". The emails derived from that send message show up in gmail. The other two don't. There are not errors on the server side that show up. It clearly shows emails being sent. Does anyone have a clue why this is happening?
  3. Why are my posts getting booted...? I just need help!!! Can someone help me getting multiple emails sent with PHP? I was able to get this to work with 1 recepient at a time, but not multiple. The other code on the forums I have not been able to get to work... can someone help with the below code? Many thanks function sentEmailSMTP2($email1, $email2) { $string2 = $email1. "@hotmail.com" . "," . $email2. "@hotmail.com"; $to = $string2; $from = "me@xxxxxxxxx.com"; $subject = 'messageX'; $message = 'Its ready'; $headers = 'From: me@xxxxxx.com' . "\r\n" . 'Reply-To: me@xxxxxx.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); $host = "mail.xxxxxxx.com"; $username = "me@xxxxxxxx.com"; $password = "password"; $mail = new PHPMailer(); $mail -> IsSMTP(); // telling the class to use SMTP $mail -> SMTPAuth = true; $mail -> SMTPKeepAlive = true; $mail -> Host = $host; $mail -> Username = $username; $mail -> Password = $password; $mail -> SetFrom($from, 'Test '); $mail -> Subject = $subject; $mail -> AddAddress($string2); $mail -> Body = $message; if (!$mail -> Send()) { echo "Mailer Error (" . str_replace("@", "@", $string2) . ') ' . $mail -> ErrorInfo . '<br />'; } else { echo "Message sent to :" . $string2 . ' (' . str_replace("@", "@", $string2) . ')<br />'; } }
×
×
  • 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.