I gang

Create .php email script

I need a .php script that will query the database and send email to selected users. I would like the script to only send email to 10 users at a time or write code so script will not fail when trying to send emails to 100 users. There are 100 total emails to be sent. When user click link within email they will be automatically logged into system, system requires email address and pin to login. It will need to be attached to URL. Most of the code is completed below, I don't have time to finish.

MYSQL database

See code below for basic idea of what is needed.

1. Select users from database: first name, last name, email address, user id (pin). from AVC where crt ="c3"

2. Add HTML Content for email

3. HTML Content:

-Subject Title

-URL with email and userid(pin) attached to URL for single click login

-Body Content

-email address

-pin

See code below for example.

<?

// send to each user in confirmed

require_once ('../[url removed, login to view]');

$query= "SELECT email, firstname, lastname, userid FROM AVC WHERE crt='c3'";

$result = mysql_query ($query);

while ($row = mysql_fetch_array($result, MYSQL_ASSOC)){

$email=$row['email'];//user email

$fn = $row['firstname'];//user first name

$ln = $row['lastname'];//user last name

$pin = $row['userid'];//user ID used as pin

$toe = $email;// to this email

$subject = "You have mail"; //enter subject here

$headers = "From: \n";//from variable

$headers .= "Reply-To: \r\n";//reply variable

$headers .= "MIME-Version: 1.0\r\n";//mime header

$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";//html charset

$body = 'Text for email to be here

[url removed, login to view]'.$fn.'&ln='.$ln.'&pin='.$pin.'&e='.$e;//enter body here HTML is enabled in this email

$return_path = ""; //for return path parameter

$param = "-f" . $return_path; //return path parameter for alternate header

//mail ($toe,$subject,$body, $headers, $param);

if (mail ($toe,$subject,$body, $headers, $param)) {

echo "<p>Message successfully sent to ".$email."</p>";

} else {

echo "<p>Message delivery failed to ".$email."</p>";

}

}

?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[url removed, login to view]">

<html xmlns="[url removed, login to view]">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<title>Untitled Document</title>

</head>

<body>

First Name Last Name

Text goes here for email

URL with variables for single click login

Output pin from database (pin = userid from database)

</body>

</html>

Færdigheder: MySQL, PHP

Se mere: subject php, return path, php send email script, login php code mysql, create php site, create php code, login php, ln, first name email, email write, email add, create php, create e, create html emails, c3, send email php mysql, html email mysql, mysql output html, php email login, output script, code create, text html php, crt, php script last, php head script

Om arbejdsgiveren:
( 1 bedømmelse ) greenbelt, United States

Projekt-ID: #928501

Tildelt til:

cristisst

I can do it immediately

$30 USD in 0 dage
(100 bedømmelser)
6.1

7 freelancere byder i gennemsnit $34 for dette job

acesolution

you have pmb.thanks

$30 USD in 0 dage
(117 bedømmelser)
6.7
shuiwatermizu

can help too

$30 USD in 0 dage
(95 bedømmelser)
6.4
varinder88

I have 3 year experience in development . I work on PHP , MySql, Joomla, And framework like codeigniter etc. I have also work on adobe flex framework. If you give me the chance , i will deliver you the best results. So Mere

$60 USD in 3 dage
(0 bedømmelser)
0.0
gr8designer08

Hello sir i can do it now.. i am web programmer.. i am working in php, mysql, javascript.. for long time.. i can 110% give you work as you want. Please message me. Thanks

$30 USD på 1 dag
(0 bedømmelser)
0.0
shohelbhuyaa

Please check my PM.

$30 USD på 1 dag
(0 bedømmelser)
0.0
Surzh

Okay. Let's go? :)

$30 USD på 1 dag
(0 bedømmelser)
0.0