PhP mail()
Moderator: General Moderators
PhP mail()
Hey guys,
i m new here.
3days ago i got a mail in my inbox including these two lines at footer:
"This email was sent to 'shuhail@somthing.com' with Member ID shuhail.
You are receiving this email because you are a registered member of something"
now, i need to know the php code to find out recipient mail address [I mean "This email was sent to: ?"]
the code to find out who is recieving the email... Thats all.
is that possible?
please help.
i m new here.
3days ago i got a mail in my inbox including these two lines at footer:
"This email was sent to 'shuhail@somthing.com' with Member ID shuhail.
You are receiving this email because you are a registered member of something"
now, i need to know the php code to find out recipient mail address [I mean "This email was sent to: ?"]
the code to find out who is recieving the email... Thats all.
is that possible?
please help.
Re: PhP mail()
i dont think this relates to php. But see if you can find out the message headers,that should give you a clue to who may have sent it
Re: PhP mail()
I m confused... the views of my post is increasing... but no solution...!!!
may be my question is not clear to the viewer.
once again:
I want to send you a email at you@you.com ,
#################################
from: me@me.com
To: you@you.com
Subject: Testing
Hello YOU,
your email address is : you@you.com
#################################
so I need the php code to find out who is recieving the email.
may be my question is not clear to the viewer.
once again:
I want to send you a email at you@you.com ,
#################################
from: me@me.com
To: you@you.com
Subject: Testing
Hello YOU,
your email address is : you@you.com
#################################
so I need the php code to find out who is recieving the email.
Re: PhP mail()
shuhail wrote:I want to send you a email at you@you.com ,
The person receiving the email is the person you sent it to. Duh.shuhail wrote:so I need the php code to find out who is recieving the email.
Re: PhP mail()
i know that...
but is there any code that will genetare in the mail and show the reciver's email address within the mail?
but is there any code that will genetare in the mail and show the reciver's email address within the mail?
-
BornForCode
- Forum Contributor
- Posts: 147
- Joined: Mon Feb 11, 2008 1:56 am
Re: PhP mail()
This may help you:
Code: Select all
<?php
$myemail = 'myemail@nothing.com';
$to = 'nobody@example.com';
$subject = 'the subject';
$message = 'hello my mail address is: '.$myemail;
$headers = 'From: webmaster@example.com' . "\r\n" .
'Reply-To: webmaster@example.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
Last edited by Benjamin on Tue Jun 30, 2009 12:03 am, edited 1 time in total.
Reason: Changed code type from text to php.
Reason: Changed code type from text to php.
Re: PhP mail()
its funny..... by the way thanks.
i am sending a mail to a lot of reciepent through bcc.
but i want their own name in the mail. but it seems impossible...
Thanks again.
i am sending a mail to a lot of reciepent through bcc.
but i want their own name in the mail. but it seems impossible...
Thanks again.
-
BornForCode
- Forum Contributor
- Posts: 147
- Joined: Mon Feb 11, 2008 1:56 am
Re: PhP mail()
If is not funny but you are still doing it than for sure you are on the wrong way. Life is to short to do what you don't like.
PS beer is good for my inner me, is revealing capabilities that i didn't know that i had
PS beer is good for my inner me, is revealing capabilities that i didn't know that i had
Re: PhP mail()
Try to use something like:
Code: Select all
$myemail = 'myemail@nothing.com';
$subject = 'the subject';
$message = 'hello my mail address is: '.$myemail;
$headers = 'From: webmaster@example.com' . "\r\n" .
'Reply-To: webmaster@example.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
$mails = array('mail1@gmail.com','mail2@gmail.com','mail3@gmail.com','mail4@gmail.com');
foreach($mail as $value){
mail($value, $subject, $message, $headers);
}