MS Outlook headers in URL of email for PHP (POSSIBLE?)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
imroue
Forum Newbie
Posts: 6
Joined: Fri Oct 18, 2002 11:24 pm

MS Outlook headers in URL of email for PHP (POSSIBLE?)

Post by imroue »

Ok.. this is a weird request, but let's see if its possible.

If I write an email to a group of people and I make the email in HTML format. I want to put a URL in the email and append to the end of the email that person's email address (who is reading). Is it possible to get the headers of the person who clicks on it automatically? Maybe append their email address.

Basically, I want to send an email to a group of people and I want to be notified (without using Microsofts notification method) who had read the email. If I get them to click on a URL, I can automatically (with PHP) log the fields on my server.

Any ideas?
Bugworm
Forum Newbie
Posts: 8
Joined: Fri Nov 29, 2002 7:54 pm

i did some stuff like this....

Post by Bugworm »

... thats basicly very easy, but not the securest way to do that... ;-)

first, send everyone that email you want, and i gues, you take the persons out of a database or something, ... so each one who gets the email is in your database, and has a number there...

so all you have to do, is to give them a link at the end of the email, they should click, and then be happy...

and in that link, you define the value of their number in the list... so the link probably would look like this...

http://www.yourdomain.com/recieve.php?number=0

the file should be there of course, and in the file you can use the variable $number and there its value will be 0.

thats the easiest way to get informations with links...

after the ? you can define as many variables as you want.. its the GET method, and it works very good....

with more variables it will look like these...

http://www.yourdomain.com/recieve.php?n ... me=stephen& ....

so to sum that up...

use the ? to add variables to a link... and the & to add more than only one variable.... and they should look like NAME=VALUE

thats all... ... the only problem is, that if you only use a number, everyone can set the number in his browser window... so any user, could send you a receive for everyone (only by changing the number)....[/list]
imroue
Forum Newbie
Posts: 6
Joined: Fri Oct 18, 2002 11:24 pm

Re: i did some stuff like this....

Post by imroue »

That's an idea too, but the problem is I have to send a mass email to these users and I can't do it one by one for each person.
Any other ideas?
Bugworm
Forum Newbie
Posts: 8
Joined: Fri Nov 29, 2002 7:54 pm

mass mail ???

Post by Bugworm »

i am sorry, i dont understand what you want, ... mass mail, or NOT mass mail these to all users ???

that wouldn`t be that hard, to make it a mass mail... and it would be easy to make it not mass mail....

if you have the users all in one array... each user in an own part of the array, with name, email, and a 0 than you can make it with a mass mail...

here is a simple example what i do mean....

lukas : lukas@blackriver.at : 0
tom : tom@blackriver.at : 0
mike : mike@blackriver.at : 0



then you simply make a sort like these code:

Code: Select all

<?php
/* define a variable, that counts foreach user one up */

$t=0;

foreach($user as $current){

/* make a message, welcoming every user personally with his/her name in front of the mail, stored on the positon $current[0] */

$message = "Hello " . $current[0] . "<br>";    
$message.="Its a wonderfull world out there!!!";  

/* now add the link to the message when they click on it, you now, that the $user[$number] ... has recieved the mail, you surely need a script on your server, where you refer to it, and which will change the 0 (for not readed) to a 1 (for readed) by the user who clicked the button */

$message.="<br><a href="www.yourserver.com?user=" . $t . ">Click the link to tell us you read the mail</a>";

/* specify the e-mail receiver for the mail, each email of the users stored in $current[1] */

$recipient=$current[1];   


/* define in the header, from who the mail is, and where the answers should go to */

$header = "From:Me to you\n";
$header.= "Reply-to:lukas@blackriver.at\n"; // thats my mail adress 

/* last but not least, define a header for the mail */

$subject = "Test it out";

/* send it away, and wait for the click */

mail ($recipient, $subject, $message, $header);

/* add one to the $t variable, for an unique link above */

$t++;


}
?>
imroue
Forum Newbie
Posts: 6
Joined: Fri Oct 18, 2002 11:24 pm

Re: mass mail ???

Post by imroue »

Hi Bugworm,

Thanks for the reply. What you have shown me is an option I might have to consider, but I would rather send the email via MS Outlook. That is I THOUGH (maybe I am wrong) that Microsoft Outlook would have something in it's headers or something that I can add to the end of the email.. I guess not.

Thanks very much for your reply again!
Post Reply