Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #3660 > unrolled thread
| Started by | Newbie |
|---|---|
| First post | 2011-11-03 17:48 +0000 |
| Last post | 2011-11-03 20:42 -0400 |
| Articles | 7 — 6 participants |
Back to article view | Back to comp.lang.php
email sent from webpage is classed as junk Newbie - 2011-11-03 17:48 +0000
Re: email sent from webpage is classed as junk Doug Miller <doug_at_milmacdotcom@example.com> - 2011-11-03 13:58 -0400
Re: email sent from webpage is classed as junk Michael Vilain <vilain@NOspamcop.net> - 2011-11-03 11:32 -0700
Re: email sent from webpage is classed as junk Doug Miller <doug_at_milmacdotcom@example.com> - 2011-11-03 16:20 -0400
Re: email sent from webpage is classed as junk Tim Streater <timstreater@greenbee.net> - 2011-11-03 20:04 +0000
Re: email sent from webpage is classed as junk Geoff Muldoon <geoff.muldoon@trap.gmail.com> - 2011-11-04 09:52 +1100
Re: email sent from webpage is classed as junk richard <member@newsguy.com> - 2011-11-03 20:42 -0400
| From | Newbie |
|---|---|
| Date | 2011-11-03 17:48 +0000 |
| Subject | email sent from webpage is classed as junk |
| Message-ID | <kek5b71den115mpli3tabl45gikmvbv9g1@4ax.com> |
Hi folks,
I have built a simple form on my website for people to enter an email
address before downloading a brochure. Every time the brochure is
downloaded I want to send an email to myself to keep track of the
people that have downloaded it. Everything works fine except for the
fact that when I recieve the email it goes straight into my junk email
cos its classed as spam. What can I do to prevent this.
Here is the code I have used
"<?php
$firstname = $_REQUEST['firstname'];
$secondname = $_REQUEST['secondname'];
$email_from = $_REQUEST['email'];
if (empty($firstname)||empty($secondname)||empty($email_from)){
?><h1 align = "center">One or more of the fields on the form has not
been completed.</h1><br>
<p align = "center">Please use the back button on your browser<br>
and complete the form correctly</p>
<?php
}
elseif (filter_var($email_from, FILTER_VALIDATE_EMAIL)) {
ini_set("sendmail_from","myemail@myaddress.co.uk");
$email_to="myemail@myemailaddress.co.uk";
$name=$_REQUEST['firstname']." ".$_REQUEST['secondname'];
$message=$name." has just downloaded the brochure from your website.
Their email address is ".$email_from;
$email_subject="A brochure has been downoaded from your website.";
$headers="From:$email_from.\n";"Reply-To:$email_from.\n";
$sent=mail($email_to,$email_subject,$message,$headers,"-f".$email_from);
if($sent){
header("Location:http://www.mywebsite/pdf/brochure.php");}
else{
echo "Request failed";}
}
else {
?><h1 align = "center">The format of the email address entered is not
correct.</h1><br>
<p align = "center">Please use the back button on your browser<br>
and complete the form correctly</p>
<?php
}
?>"
[toc] | [next] | [standalone]
| From | Doug Miller <doug_at_milmacdotcom@example.com> |
|---|---|
| Date | 2011-11-03 13:58 -0400 |
| Message-ID | <j8ukp2$okp$1@dont-email.me> |
| In reply to | #3660 |
On 11/3/2011 1:48 PM, Newbie wrote: > Hi folks, > > I have built a simple form on my website for people to enter an email > address before downloading a brochure. Every time the brochure is > downloaded I want to send an email to myself to keep track of the > people that have downloaded it. That's silly. Keep track of it in a database instead, if you must. > Everything works fine except for the > fact that when I recieve the email it goes straight into my junk email > cos its classed as spam. What can I do to prevent this. Fix the filters in your email client so that doesn't happen. > Here is the code I have used [Irrelevant code snipped] This isn't a PHP problem, or a problem with your PHP code. The problem is *entirely* with the configuration of your email client.
[toc] | [prev] | [next] | [standalone]
| From | Michael Vilain <vilain@NOspamcop.net> |
|---|---|
| Date | 2011-11-03 11:32 -0700 |
| Message-ID | <vilain-51FF4B.11320103112011@news.individual.net> |
| In reply to | #3661 |
In article <j8ukp2$okp$1@dont-email.me>, Doug Miller <doug_at_milmacdotcom@example.com> wrote: > On 11/3/2011 1:48 PM, Newbie wrote: > > Hi folks, > > > > I have built a simple form on my website for people to enter an email > > address before downloading a brochure. Every time the brochure is > > downloaded I want to send an email to myself to keep track of the > > people that have downloaded it. > > That's silly. Keep track of it in a database instead, if you must. > > > Everything works fine except for the > > fact that when I recieve the email it goes straight into my junk email > > cos its classed as spam. What can I do to prevent this. > > Fix the filters in your email client so that doesn't happen. > > > Here is the code I have used > > [Irrelevant code snipped] > This isn't a PHP problem, or a problem with your PHP code. The problem > is *entirely* with the configuration of your email client. OR it's the mail _SERVER_ that he's sending the email through. Some ISPs are spam nazis. There may be a way to 'whitelist' mail sent from the web _server_ that's running the php code. Contact your ISP to see if there's a way to do this. -- DeeDee, don't press that button! DeeDee! NO! Dee... [I filter all Goggle Groups posts, so any reply may be automatically ignored]
[toc] | [prev] | [next] | [standalone]
| From | Doug Miller <doug_at_milmacdotcom@example.com> |
|---|---|
| Date | 2011-11-03 16:20 -0400 |
| Message-ID | <j8ut32$ic0$3@dont-email.me> |
| In reply to | #3662 |
On 11/3/2011 2:32 PM, Michael Vilain wrote: > In article<j8ukp2$okp$1@dont-email.me>, > Doug Miller<doug_at_milmacdotcom@example.com> wrote: > >> On 11/3/2011 1:48 PM, Newbie wrote: >>> Hi folks, >>> >>> I have built a simple form on my website for people to enter an email >>> address before downloading a brochure. Every time the brochure is >>> downloaded I want to send an email to myself to keep track of the >>> people that have downloaded it. >> >> That's silly. Keep track of it in a database instead, if you must. >> >>> Everything works fine except for the >>> fact that when I recieve the email it goes straight into my junk email >>> cos its classed as spam. What can I do to prevent this. >> >> Fix the filters in your email client so that doesn't happen. >> >>> Here is the code I have used >> >> [Irrelevant code snipped] >> This isn't a PHP problem, or a problem with your PHP code. The problem >> is *entirely* with the configuration of your email client. > > OR it's the mail _SERVER_ that he's sending the email through. Some > ISPs are spam nazis. There may be a way to 'whitelist' mail sent from > the web _server_ that's running the php code. Contact your ISP to see > if there's a way to do this. > The problem is still in his client.
[toc] | [prev] | [next] | [standalone]
| From | Tim Streater <timstreater@greenbee.net> |
|---|---|
| Date | 2011-11-03 20:04 +0000 |
| Message-ID | <timstreater-DE6088.20041303112011@news.individual.net> |
| In reply to | #3660 |
In article <kek5b71den115mpli3tabl45gikmvbv9g1@4ax.com>, Newbie wrote: > I have built a simple form on my website for people to enter an email > address before downloading a brochure. Every time the brochure is > downloaded I want to send an email to myself to keep track of the > people that have downloaded it. Everything works fine except for the > fact that when I recieve the email it goes straight into my junk email > cos its classed as spam. What can I do to prevent this. Mark it as "Not spam" in your email client. -- Tim "That excessive bail ought not to be required, nor excessive fines imposed, nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
[toc] | [prev] | [next] | [standalone]
| From | Geoff Muldoon <geoff.muldoon@trap.gmail.com> |
|---|---|
| Date | 2011-11-04 09:52 +1100 |
| Message-ID | <MPG.291dc62faa2866a26e@news.x-privat.org> |
| In reply to | #3660 |
Newbie says... > I have built a simple form on my website for people to enter an email > address before downloading a brochure. Every time the brochure is > downloaded I want to send an email to myself to keep track of the > people that have downloaded it. Everything works fine except for the > fact that when I recieve the email it goes straight into my junk email > cos its classed as spam. What can I do to prevent this. Try tinkering with the optional additional headers parameter of the PHP mail function, particularly the -f "from" header as if this is not set a lot of SMTP (particularly postfix) gateways might mark it as from a non- authenticated (potential spam) source. GM
[toc] | [prev] | [next] | [standalone]
| From | richard <member@newsguy.com> |
|---|---|
| Date | 2011-11-03 20:42 -0400 |
| Message-ID | <un2csybn0va8.1dbjqg3jcr6yq$.dlg@40tude.net> |
| In reply to | #3660 |
On Thu, 03 Nov 2011 17:48:55 +0000, Newbie wrote:
> Hi folks,
>
> I have built a simple form on my website for people to enter an email
> address before downloading a brochure. Every time the brochure is
> downloaded I want to send an email to myself to keep track of the
> people that have downloaded it. Everything works fine except for the
> fact that when I recieve the email it goes straight into my junk email
> cos its classed as spam. What can I do to prevent this.
> Here is the code I have used
>
> "<?php
> $firstname = $_REQUEST['firstname'];
> $secondname = $_REQUEST['secondname'];
> $email_from = $_REQUEST['email'];
> if (empty($firstname)||empty($secondname)||empty($email_from)){
> ?><h1 align = "center">One or more of the fields on the form has not
> been completed.</h1><br>
> <p align = "center">Please use the back button on your browser<br>
> and complete the form correctly</p>
> <?php
> }
> elseif (filter_var($email_from, FILTER_VALIDATE_EMAIL)) {
> ini_set("sendmail_from","myemail@myaddress.co.uk");
> $email_to="myemail@myemailaddress.co.uk";
> $name=$_REQUEST['firstname']." ".$_REQUEST['secondname'];
> $message=$name." has just downloaded the brochure from your website.
> Their email address is ".$email_from;
> $email_subject="A brochure has been downoaded from your website.";
> $headers="From:$email_from.\n";"Reply-To:$email_from.\n";
> $sent=mail($email_to,$email_subject,$message,$headers,"-f".$email_from);
> if($sent){
> header("Location:http://www.mywebsite/pdf/brochure.php");}
> else{
> echo "Request failed";}
> }
> else {
> ?><h1 align = "center">The format of the email address entered is not
> correct.</h1><br>
> <p align = "center">Please use the back button on your browser<br>
> and complete the form correctly</p>
> <?php
> }
> ?>"
One possibility is that your IP is on somebody's black list.
But your mail client should have the option as treating that domain/IP as
"not spam".
Check in your options.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.php
csiph-web