Below is the scripts that triggered everytime users update the database and send a blast of emails to the user group. The problem is the email goes to JUNK folder and I wonder though I use the company STMP and company email.
Any idea how to this happened? - #email process starts here
-
require("class.phpmailer.php");
-
$mail = new PHPMailer();
-
$mail->From = "xxx@xxx.com";
-
$mail->FromName = "adminr";
-
$mail->Subject = "New Document";
-
$mail->Host = "xx.xx.x.x"; // SMTP server
-
$mail->Mailer = "smtp";
-
-
$query ="SELECT * FROM members" ;
-
-
$result=@MYSQL_QUERY($query);
-
while ($row = mysql_fetch_array ($result)) {
-
// HTML body
-
$body = "Hello <font size=\"4\">" . $row["fname"] . "</font>, <p>";
-
$body .= " <font size=\"4\"> A NEWdocument is now available for your review" . $row["fileid"] ."</font><p>";
-
$body .= "Thank You, <br>";
-
$body .= "Administrator";
-
-
/ Plain text body (for mail clients that cannot read HTML)
-
$text_body = "Hello " . $row["fname"] . ", \n\n";
-
$text_body .= "New document is now available for your review.\n \n";
-
$text_body .= "Thank You, \n";
-
$text_body .= "Administrator";
-
-
$mail->Body = $body;
-
$mail->AltBody = $text_body;
-
$mail->AddAddress($row["email"], $row["fname"]);
-
-
if(!$mail->Send())
-
echo "There has been a mail error sending to " . $row["email"] . "<br>";
-
// Clear all addresses and attachments for next loop
-
$mail->ClearAddresses();
-
$mail->ClearAttachments();
-
}
-
3 4700 code green 1,726
Recognized Expert Top Contributor
I think you'll find this is down to the filter settings on the receiving email application.
You cannot tamper with a receiver's email settings but you can try to beat the filter.
To avoid emails going to junk or being flagged as spam the content needs adjusting.
This is a fairly dynamic subject but just one word can condemn the email.
A study of this subject is recommended.
Another problem can be attachments. Try zipping them.
Atli 5,058
Recognized Expert Expert
I would also reconsider the subject of your mail. Try making it more... like an actual sentence.
Meaning; instead of "New document", try something like "There is a new document ready for you.".
And, also,it's best to use "\r\n" for line-breaks in emails.
dlite922 1,584
Recognized Expert Top Contributor
It also has to do with the reputation of the sender's mail server/domain accounts.
I know hotmail junks it if the domain is new and doesn't have an SPF record.
DNSstuff.com use to have a good checking mechanism but that site is not free anymore. That's what I used to correct all the non-standard setting about my domain and mail records.
Also, make sure the email is structured (i.e. has headers, from address, etc).
After all this, then worry about words in your email or attachments.
Good luck,
Dan
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Good Man |
last post by:
Hi
I'm building a 'job posting' site of sorts.
When a job is available in a particular state, I want the system to send an
email to everyone who is 'watching' that state.
I know how to do this, but I need to figure out a way to 'send the emails
in the background' - ie: if an administrator adds a job to Wyoming, I don't
want them to have to wait for the php script to finish selecting and e-
|
by: John Davis |
last post by:
What is the **MOST** obvious reason why will this will fail (it's not syntax
or anything specific to the object)?
Function Mail(MailerProgram, Message, Subject, Format, FromEmail, ToEmail,
ReplyTo, FromName, ToName, MailerPath, BCCEmail, Attachement)
Set Mailer = Server.CreateObject("Persits.MailSender")
if NOT isObject(Mailer) Then
Mail = false
Exit function
|
by: HB |
last post by:
As many of us know, when we send legitimate emails to real customers from
our apps, those emails often end up in the Hotmail (and MSN -- and AOL, too)
junk folder. I've done a lot of testing with Hotmail, using different
domain sender names, different sending IPs, different SMTP servers, etc.,
different email text, and I still can't find out why Hotmail blocks so many
good emails and throws them in the junk folder. The sending IP even has...
|
by: =?Utf-8?B?TWlrZSBI?= |
last post by:
I'm using a block of ASP to allow a user to send a form via e-mail.
However, someone keeps sending me spam through this form
and they're using a bogus return address. I'm testing for a
successful send, which should fail if the return address is
not valid, but I'm still getting the junk.
The block looks like this:
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.RemoteHost = "smtp.xxx.com"
Mailer.FromName =...
|
by: sweetpotatop |
last post by:
Hi,
I have been using "Mail" in ASP.NET to send email, however, email
deliveries to the Junk-Email of the receiver. Is there a way to get
around this please?
Thanks in advance. Your help will be greatly appreciated.
| |
by: =?Utf-8?B?TMOhemFybw==?= |
last post by:
Hi everyone
I've a simple ASP.NET Page that send a email using smtclient. The server is
a Exchange and use my credentials to autentificated.
The problem is that the send mail appear in the junk email folder.
Any idea.
Thanks
|
by: Dave Kelly |
last post by:
Sorry for the long post, it is easier to discard information than
to have to wait for it to arrive.
So here goes:
This code worked perfectly when I was an Earthlink customer. Sprint
decided not to pardner with Earthlink and create their own IP. Since
then everything email has been broke.
Sprint/Embarq is the only copper wire DSL provider where I live.
|
by: tiijnar |
last post by:
Hi Friends,
I Have written a java code to send mails to some receipients.It sends to internal mail ID's in the office. An SMTP server has been provided to me. But the problem is that the mails are being sent to Junk folder of the recepients.
1) The mail contains only plain text, it doen't have things like images or something which is treated as a SPAM or junk.
2) Since the mails are being sent to the internal mail ID's in the office,...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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 we have to send another system
| |