473,480 Members | 3,017 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

mail gets in to spam

134 New Member
Hi

i'm sending mail using the below function.,

the function sends the mail but the recipient gets the mail in spam.,

could anyone help.,

Expand|Select|Wrap|Line Numbers
  1. <?
  2. $headers = "From: '$from'" . "\r\n";
  3. if(mail("example@gmail.com","hi","how r u",$headers)){echo 'success';}
  4. ?>
  5.  
regards
vijay.
May 22 '08 #1
3 1126
rizwan6feb
108 New Member
There is nothing wrong with the script. Your ip may be added in the spam list of the server, you are sending mail to
May 22 '08 #2
Atli
5,058 Recognized Expert Expert
Hi.

There are a great many spam-filters out there, and I won't presume to know how they all work.
But I do believe most of them will consider such short messages to be spam, as this is how much of the actual spam looks like.

Try sending an actual message, that looks like something you would actually send to somebody.

You could also try to use some of the free mail classes that are floating around. Many of them have been optimized to include headers and stuff that will make you messages less likely to look like spam.
For example, Swift Mailer or PHPMailer.
May 22 '08 #3
dlite922
1,584 Recognized Expert Top Contributor
Hi

i'm sending mail using the below function.,

the function sends the mail but the recipient gets the mail in spam.,

could anyone help.,

Expand|Select|Wrap|Line Numbers
  1. <?
  2. $headers = "From: '$from'" . "\r\n";
  3. if(mail("example@gmail.com","hi","how r u",$headers)){echo 'success';}
  4. ?>
  5.  
regards
vijay.

Actually unline the other two mentioned, that's no even closely related as having your domain in check.

Google SPF.

It will take a while for new domains to have email sent into inbox instead of junk folder.

But know the basics. Always add a "From" email field as those without it are marked as spam.

dnsstuff.com used to give you lots of info for free, but now its membership. I've seen their service and it is worth the price, i'm just too cheap. It may be well worth it to have them check MX records etc.

Cheers,

Dan
May 23 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

16
2653
by: SamMan | last post by:
May be a bit off-topic... When bots scan the web for e-mail address to use for spam, do they look at what the browser is displaying, or scan through the underlying HTML markup for e-mail...
16
2338
by: polilop | last post by:
I made a form in which I send the visitor a link to my page but when the visitor gets that link in the mail it dosent send him to the page just says invalid syntax or something like...
8
9490
by: Squirrel | last post by:
Hi everyone, I've created a mail merge Word doc. (using Office XP) , the data source is an Access query. Functionality I'm attempting to set up is: User sets a boolean field to true for...
39
3278
by: Viken Karaguesian | last post by:
Hello all, <SIGH> I'm soooooo sick and tired of getting spam e-mails. I'm sure that part of the reson for this is that my e-mail address is publicly available on my website, ready to be picked...
0
1535
by: Neo Geshel | last post by:
I am experiencing an inconsistency with System.Net.Mail. I have a web form on a site. The form gets filled, and one copy gets sent to the recipient (info@domain.com). This works just fine. ...
3
3272
uranuskid
by: uranuskid | last post by:
Hey folks, I was going to include a contact form on my website. Well, in the first place that seemed an easy thing to do with a form that prompts a PHP file validating the input vaiables and using...
15
15129
by: Craig Hurley | last post by:
Hello, user@x.com receives an email from user@a.com. I want to forward that email to user@y.com. I want the contents/header to remain intact, with the exception of adding "X-Forwarded-For". ...
5
3228
by: Gordon | last post by:
I'm working on a reset password script for my CMS, that will generate a random password and email it to a user when they request one. The problem I am having is that the mails being sent out are...
2
1541
by: Marise | last post by:
Hello, I developed a PHP to send confirmation mail to my users. The users complainthat the mail goes to the SPAM section each time. What is the reason for this? I tested it several times, and I...
0
7055
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6920
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7060
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5365
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4799
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4501
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1311
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
572
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.