Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




Forward Email, Change Sender Address


Is there anyway I can set up a personal 'remailer' type of thing
on my domain ?

I can not email a friend at his workplace because his company
have put a 'block' on emails from my work address (the companies
we work for are considered rivals) - I am after a way to
'bounce' or forward an email, so my originating address isn't
shown.

I have tried email forwarding (in CPanel) using addresses set up
in my domain but when they forward, the original sender is
shown, therefore the block applies.

I have also tried using Bigfoot but again, the original sender
is shown.

Is there any way, using PHP or otherwise, that I could somehow
receive a message sent to an address in my domain, and forward
it on with a different "from" address ? (There would only be 1
specified address that I would want to forward on, to prevent
abuse!)

i.e.

from xxxx@company1.com => xxxx@mydomain.com, this then forwards
the original mail but from xxxx@mydomain.com =>
xxxx@company2.com

Unfortunately webmail isn't an option as we don't have web
access at work, and it has to be sent through the work Email
system, Outlook.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Change From Address In Email Sent From Php Script
I have a strange problem that I'm not sure how to solve. I have a web form that collects name, email and message from users of my website. This info is posted to a php script which then emails the info to our email address.

The problem is, the from address never gets changed from webmaster@ourdomain.com. I haven't specified this address in the script at all and am adding extra headers to try and change the from address to the email addy specified by the user.. Code:

Adding IP Address Of The Sender When Sending Mail Through MailI()
How can we add the IP address of sender in the Headers of the Email address? if we use the mail() to send an email, the receviing person will get the IP address of the server in the header of the mail. but i want that he should get the IP address of the Sender as well.

Forward A URL And Change A Component
I've just had to move a MediaWiki installation from one area of my site to a subdomain on another area. I need a way to forward URLs, so that whenever anyone requests a URL for the wiki at the old location, they are automatically forwarded to the URL on the new location. The system would need to add a subdomain, but also change the article pointer. For example: Code:

Mass Email Sender
I'm looking for the best way to send a mass email to all adresses listed in my MySQL database. There are currently more than 17.000 email adresses. Code:

How To Include Sender Name In Email?
I am sending email using PHP's mail utility. I have found the
syntax for including the "From" and "Reply-To" headers (the sender's
email), but I can't find how to include the first and last name of the
sender -- i.e. they see "Joe Blow" as the sender in our in-box instead
of

Can You Use PHP To Keep Sending Junk Email Back To The Sender
I once had someone send me SEX junk mail each week, using a linux program I
multiplied it about four thousand times then bounce it, it took about half
an hour or so to go out on 52K dial up, but it choked his email box, I think
the joke exposed him self to the country not long later. Just goes to show
my action did work, my (old) ISP was not happy, I told them were to go and
closed down my account.

Determine A Forward Email Addy
i have an application that sends out mail from flash. in each mail there is a link for the viewer to click on. when the viewer clicks the link blah.php?email=email@address.com it updates the database adding their email to the list of people who have clicked that link.

i want to be able to track emails that have been forwarded. the problem is if someone forwards, it will forward with their email attached to the link instead of the recipients.

is there any way i can grab the recipients email and put it in the link?

Need Email Address From Submitted Html Email Form
I have an html email that contains a form with questions for the user to fill out. Without asking the user to re-input there email address into the form, is there a way for me to grab the email address its coming from when the user submits the form to the php processing program. I need a way to match the questions to the user when they submit the form.

Email Array Checking Validity Of Email Address
I had the following working but since I changed the email variable to an array it doesn't work. email[] This is part of an edit form where emails in the mailing lists can get updated however, before they get updated i need to check that each of the email addresses are valid.But the code doesn't work for the array. Code:

Hiding The Receipeint Email Address While Sending Email
i am sending an email using php. i dont want the receipeints to see the to address. the problem is i am sending to a mailing list email address. so how can i hide the to address and the from address if possible?

Block Email Address / Domain From Using Email Form
I keep getting the same person spamming people on my website through my email form.

The email address is they keep using is sadlowski_lidia@o2.pl but this sometimes changes to a different name but still from the o2.pl domain

How can I block anyone using my email from the domain name o2.pl

Change The From Address In Th Mail() Function
I have been trying to find a way to change the name of the senders email when using the mail() function. I would like it to change the senders email address to read something like "Company Name Inc".

The problem is when I set the $from = "From: Company Name Inc"

I get the email with the from being: Company@ourserver.comName@ourserver....@ourserver.com

is there anyway I can change this?

I have found that if I change it to CompanyNameInc@theCompany.com

it sends the email with the from being:

CompanyNameInc@theCompany.com

I would really like to have it read: "Company Name Inc" period I want to remove the @whatever.com all together.

Email From Address
I want to send email through PHP mail function. i am passing headers for from address.
But it sends email address as Sender in yahoo. I want to print Name also as sender : Jeff.
PHP Code:

Getting Address From Email
How do you get the text between two characters, such as < and >? For example, you have the From: line in an email "Their Name <name@somewhere.com>", how would you get just the address part from it? I guess the preg thing is used here, but I don't understand it at all.

Validating Email Address
ok, I have developed a PHP script which sends a user there password, kinda a forgot password type thing. Just one thing i really cant work out. I need to validate the email address to ensure it is URL rather than just anyold email address, ie. it must contain mydomain.com at the end of it.

so essentially all i need to do is grab the text from the email address field, trim the contents before that '@' and store this into a variable.

then an if loop, if the variable = 'mydomain.com' then execute the script, else diaply an error message

How would I go about doing this?

Email Address Verification
I am writing a great mailing list program that I will distribute for free that comes with email addresses, tracks what was sent to who, how many times, handles campaigns, etc. What I want to do is before a message is sent, the email address is pulled out of mySQL, verified that it is real by looking for the address on the internet, sending the message, and then recording stats in the mySQL DB. I have everything done except for the verification (real).

Verifying An Email Address
I'd like to check (for security purposes) that an email address entered in a text input is valid (ie it contains at least one. which must be after the @ and contains no semi-colons). How can I do this in PHP? I figured it can be done with Regular Expressions but they're not very well-documented in my PHP book.

Email Address Length
Does anyone know if there is a maximum allowable character length for email addresses? If so what is it?

Verify Email Address
how can i verify the email address entered by client?

is there any readily available function for that in php or mysql?

else suggest me some links for verifying email address enetered by
client.

Obtaining Email Address.
I have been a victim of a website ( coded using php ) managing to obtain my
email address just by visiting the website. I know get loads of rubbish via
that email account.

How have they managed to do this?

The reason i ask is so i can stop it. Oh and also being into php a bit i
would also like to try it out :) just for fun.

Verify Email Address
I am creating a registration form. There have a email field. After successfully complete a mail with activation link will send to the email. After clicking the activation link then he can login. So how can I do this?

Email From Address And Attachments?
mail($EmailTo, $Subject, $Body, $mail_header, "From: <$from>");

im trying to set the from address in an email, but when i do it with the above it doesnt work!  Instead it stops the header being set to HTML and shows that code.  Can any one tell me where im going wrong? Also how can i send attatchments with an email?

Sender's Email Address
I have a site on GoDaddy and have made a contact form using php/html. It's working great, however the customer's email address shows up in the body and the "from address" is some automatic address generated in the process. How can I have the customer's email address be the from address when receiving their request? Here is the code from the 2 pages involved. Code:

Valid Email Address Checking
Hey there. I need to check if a given email address is formatted correctly. I picked up this line somewhere

ereg("^[_a-z0-9-]+(.[_a-z0-9-]+)*@[a-z0-9-]+(.[a-z0-9-]+)*$", $email)

and it works, mostly. The big problem is that it allows addresses without a suffix. For instance, it allows "jaeger@hotmail", without the ".com". (This isn't my address.) I tried other invalid forms, and it caught them. I figured someone would already have a ereg string which works, so I won't bother trying to figure it out.

Parse A String With An Email Address
I need to parse a string with an embedded email address.
The string always has the format NAME (name@domain) SOMETEXT.
What I need to get is the email address as name@domain.

I came up with this (I know it's broken, but it's a first start):

<?php

function ParseTicketEmail($ticket)
{
global $TicketEmail;
for ($i=0; $i< strlen($ticket); $i++){
//we need to pass everything between ( and ) to $TicketEmail nothing else
do {
$ticket[$i] = $discarded;
} while ($ticket[$i] != '(');
while ($ticket[$i] != ')'){
$TicketEmail = $TicketEmail . $ticket[$i];
}
}
return $TicketEmail;
}

$ticket = "hello (world@world.com) bla";
print "$TicketEmail";
print "$discarded";
?>

But that doesn't return anything for either $TicketEmail or $discarded.
So:

a: why doesn't it return anything for either string? (It's too early in the morning here)

b: does anyone have such a function anywhere for me to check out for how to do it?

Remove Last Part Of Email Address
Is there a simple way to remove the last part of an email address using
PHP. I want to remove the @ symbol and everything to the right of it.
Any ideas?

Example:

thomas@xyz.com

should be:

thomas

Thanks!

Strip Email Address From Field?
I'm looking for a routine than can find any valid email address in a field and replace it with text. For example if the field was filled with "My email address is foo@foobar.com and I'm ugly" then the routine would change the text to: "My email address is newtext and I'm ugly" Any ideas on how to accomplish this?

Preg_match / Valid Email Address
Right now, I am doing this:

function sys_is_valid_email ($s) {
if (preg_match ("/^.+@.+..+$/", $s)) {
return 1;
} else {
return 0;
}
}

It works great, but it doesn't allow a number at the beginning.

For example
2cool@forme.jom can not be entered
1953@forme.jom can not be entered

but,
cool2@forme.jom can be entered
d1953@forme.jom can be entered

How To Use URL Variable To Decide Which Email Address To Use
I have a list of committee members on my classic car site with their email addresses for people to write questions to them.

But to avoid spam I would like to have just a button that says "email" and when the vistor pushes that a variable is passed into the URL. I then want a standard form to use that specific variable to decide which email address to use from a list.

eg I want a list of email address numbered 1 to 30 held in a file out of view of the visitors to the site. When the form page is loaded it will pick up that variable to decide which address from the list is to be used.

Preg_match_all Pattern For Email Address
I'm trying to flag and mask emails from a text string. I found this
on Zend but cannot get it to work. It is supposed to create an array
of email addresses but I think there is something wrong in the
'preg_match_all' call for the pattern. I cannot figure out if this
pattern is even correct.

function get_emails ($str)
{
$emails = array();
preg_match_all("/bw+@w+[.w+]+b/", $str, $output);
foreach($output[0] as $email) array_push ($emails, strtolower
($email));
if (count ($emails) >= 1) return $emails;
else return false;
}

# Here is how to use it.

# Sample string containing email addresses;
$str = "test test@... ha ha heHe@... bla bla bla@...";

# Get the emails on arrays;
$emails = get_emails ($str);

# Print that arrays;
print_r ($emails);

Secure Email Address Function
I am using the following email security script on many of my applications and I have just received an email today where someone told me that it doesn't work on about 80% of his emails. It doesn't work for domains that use .info and some other domain extensions.

How can I fix this. This is urgent as I am using this on contact forms, submission forms, etc. PHP Code:

Preg_match To Block Email Address(es)
I have found the below code I change it to *.EXT instead of the ending of the email address for example *.com Now if someone had abc.EXT@my-domain.co.uk would the below code echo the message or would it let it pass and only block abc@my-domain.ext ?

Also does anyone know if it is case sensitive ? Finally how would I have to to check for .EXT and .EXT1 etc..., would I need to repeat the code or can I have it all within the same code, if so how ? Code:

How To Exclude A Specific Email Address
I wish to exclude a specific email address when one sends an ecard from my site.  How does one exlude this email address but allow all others to continue on their merry way?
Code currently used:

function validEmail($address)
{
if (eregi("^[a-z0-9]([._-]?[a-z0-9])*@[a-z0-9]([.-]?[a-z0-9])*.[a-z]{2,}$", $address))
return true;
else
return false;}

Verifying The Existence Of An Email Address
if (preg_match("/^[a-zA-Z_]+(w+)*((-w+)|(.w+))*@w+((.|-)w+)*.w+$/i",$Email)){
   $messages['ValidEmail'] = "* Your email address is valid, Your Registered! ";}
      else {
   $flag = "1";
   $messages['InvalidEmail'] = "* Your email address is not valid, please re-enter your email address.";

I tought the above would work but apparently it only checks the an email address has all its attributes (******@***.***)

it doesn't go check to see if the email is in existence..  what do i need to do to check the email existence?

Send To Another Email Address With This Form?
How would i send this to another 2 email address of my choice in a blind cc? Code:

Change Color In The Message Of Email
I have a program which sends a message through php.. The data is collected from MY Sql database and send using mail function.. Now I want to make some words bold in the message and change color of some words... But I cannot do it through the HTML Tags.

Can I Hide My Email Address In Require File
I am wanting to hide my email address so that a spammer cannot use one of their "crawlbots" to crawl the pages in my web site and steal my email address.

Can a spammer's crawlbot find my email address if I place my email address in an include file and place the include file somewhere like, for example, the configuration folder?

Error Handler With Email Address Defined Elsewhere ?
Without using globals, how would one use an email address defined elsewhere, from within an error handler function. I can t pass it in as an argument, and the variables outisde the function arent available within it.

Preg_match Problems For Email Address Validation
I've been working on some email validation code cause I couldn't find anything very accurate on the web to do this (the php.net stuff is junk <sorry>)I was wondering 2 things:

1. If anyone would find this useful .. feel free to "borrow" it ...
2. If anyone could be bothered .. could they look over this and give me any feedback on whether it seems accurate .. or if there are any glaring holes in the code ..

I know there are a few holes in it like not being able to detect double dots ".." in the address so if anyone has any ideas around this flaw please let me know. Code:

Checking If Email Address Is Live And Real?
There's all kinds of ways to validate an email address to make sure
it's well formed and whatnot, but what about checking to see if it's a
valid e-mail account?
Like how you can use checkdnsrr() to check to see if a URL is valid.

I know finger used to be used at one time, no? But server block finger
requests, and I'm not sure many e-mail accounts out there are even
fingerable type accounts anyway.

How To Extract An Email-address From A Text File
Can somebody show me a quick code snippet to reliably extract an
email-address form a text file ?

Script Hide Email Address From Spambots?
Below is (a part of) a script that I am using on my web site. In order to guard against "spambots" I am including my email address in the "email_address.inc.php" require file.

I have the "conf" directory password protected. A "spambot" crawler can't get to it from a direct call (I don't think) because the directory is password protected. The script below will call the "email_address.inc.php" file just fine from the password protected directory.

The "Submit" button has to be activated and the input in the "$FirstName" and the "$LastName" input boxes has to be in the right format before the "email_address.inc.php" file will be called (using the code in the script).

My question is this: Does anybody see how a "spambot" could get into my "email_address.inc.php" file the way I have the code written below? PHP Code:

Hiding Email Address From Mail 'To' Column...
i have an application where i need to send an email within the system. i should not display the email address anywhere in the email. as of now, the way it shows up(on the recipients computer) when i send the email is. Code:

Inserting Different Email Address Into Feedback Form
I have a website which contains "profiles" for around 200 small hostels and tour companies in South America.  each profile has a feedback form inserted into it using SSI which allows backpackers to send emails direct to the hostel/company.  When the submit button is pressed, it executes a PHP script (which I got off thesitewizard.com) to mail the form back direct to the company. 

Whilst the actual feedback form itself is one file, inserted into each profile, the PHP that executes is separate for each company - the only reason is because the email address differs for each company.

My main aim is to have the bulk of the PHP script as one file and somehow include the email address into the PHP script either using somekind of include() from a separate file or otherwise taking it as a variable in the profile page itself.

As I'm rubbish with PHP, I trawled the net and read through about a dozen tutorials regarding PHP include, but the script fails to execute when I do this.  The code I am using is:  <?php include("file.php"); ?>.

The include function definately works as I have tried creating a blank php file with just <?php include("file.php"); ?>  (where file.php is the FULL php script) in it and it executes perfectly.   However,  When I divide the script in two and put the first half in the document and follow it with <?php include("file.php"); ?>   eg...

<?
$mailto = "info@email.com";
<?php include("file.php"); ?>

I get an error message stating: Parse error: syntax error, unexpected '<' obviously because it can't handle the <? before the php include.

Is there a way in which you can insert plain text (ie an email address perhaps from a text file) into a PHP script?

Max. Size Of Email Address List With Mailto: ?
I'm experiencing problems with a large Bcc: email address list.  I can't use PHP mail() right now, and I'm not sure I'll be able to in the future, so I'm trying to make my code work with HTML mailto:.  I'm finding that I can generate an email message in MS Outlook IF my Bcc: list is about 90 emails long.  Anything longer than that, and the email will not generate, and I get no error message. 

I'm not sure if there is a max. number of email addresses, or a max. number of characters.  I can MANUALLY cut and paste a list of 300+ email addresses into the Bcc: field in the email message, but I need to generate this email message via code. My code looks something like this:

">Generate Email with HTML mailto:

$emailBCCList = 'name1@domain.com,name2@domain.com,name3@domain.com,etc.'

I'll need to send out a single email that has approx. 300 or more Bcc: email addresses as part of a large invitation (this is NOT spam; these individuals have asked to be invited).

Email Sending From Address To Be Actual Sender's
I am using a script to send an email to me whenever someone registered in my custom make PHP script site. Following is the extract of the email sending function of my code.

The problem is I need this script to send the mail where from address should be the actual user’s address (i.e. if marcel34@hotmail.com register a new account I need this system to send the following mail that should look like coming from [email]

$FromName = $Email;
$ToEmail = $listmail;
$Message = "
Please subscribe me

User Name : " . $UserName . "
Mailing : " . $Mailing . "
Name : " . $CustomerName . "
Email : " . $Email . "

.....

Pulling Email Address From Database For Mail()
Maybe it's because it's late or maybe I'm just a newbie (couldn't be) but I'm having trouble with getting all the names from my database into my $to variable.

$sql_mail = "SELECT email
FROM players
WHERE email!= 'none'";
$result_mail = mysql_query($sql_mail);

//bunch of error message validation stuff...

//fetch email addresses from query
while($row_mail = mysql_fetch_assoc($result_mail)){
$to = $row_mail['email'].", ";
}
$subject = $_POST['subject'];
$headers .= "From: Me <email@site.com>";
$headers .= "Reply-To: email@site.com;
$message = $_POST['message'] . "";

//now before sticking $to in mail() now with my $headers, $subject and $message I figured that if I try that php will only include the first record.

echo $to; //returns first record as I figured.

How do I keep the list of emails from my while without having all the other stuff ($headers etc) repeat with every record?

Extract Email Address Domain From $_POST
I have a script that takes form data and posts to a DB. I have someone that is doing alot of fake posting and using weird email address all with my domain as part of the email address that they use. How can I use and if statement to ask if the domain is mine from $_POST[email] then do not allow the post if the domain is mine?

Email Notification When A Server File Change?
I'm looking for an script that will notify me by email or log file when any server file change.


Copyright © 2005-08 www.BigResource.com, All rights reserved