You are required to register before you can post. This is via a custom verification system. Please post any problems you are encountering here and I`ll do my best to respond as soon as I can. Please note that a reply WILL be posted to all queries, so do not double post. There are no guarantees
when a reply will appear but I do my best to answer all within 3/4 days max. Bumping topics won`t make the slightest difference.
IMPORTANT: Posts in English ONLY please, thank you! Any other languages will be ignored and your message deleted.
SEARCH: Use the search option to see if your question has been answered on the forum before. Or check the relevant script docs.
CUSTOMER: If you have purchased a commercial version of any of my software, using the contact option at the licence centre ensures a faster response.
AUTO DELETION: Accounts older than 5 days, with no posts or topics, are automatically deleted. Only register if you are thinking of posting.
PRIVATE MESSAGES: Private messages are currently disabled.
LINKS: Any links posted are 'NOFOLLOW' and will not be picked up by search engines.
You are not logged in.
Hi,
a while ago, the e-cards system stopped sending to Yahoo and Hotmail addresses.
According to my hosting provider that was because both providers had blocked their IP address.
In the mean time, Yahoo is working again, but Hotmail is not.
I was advised the following:
Hi Frankie,
It looks Hotmail will take sometime before they whitelist us. In the mean time, as you mentioned you are using Phpmailer to send e-mails - I suggest you try the SMTP option to send e-mails. If it does not work, try using Google SMTP server to send your mail. Hope this helps.
Regards,
I have tried to use both options, but I am not sure how to do it.
I did some editing to classes/class.phpmailer.php and class.smtp.php.
I now get no more bounce messages from hotmail, but the cards do not arrive neither.
I think my best bet would be to use my Google smtp server, but how do I set that?
I use smtp.gmail.com on IMAP and port 465.
Also, do I have to set PHPMAILER to 1 or 0 if I use my gmail server?
Thank you.
Last edited by Klauwaart (02-02-2012 01:07:21)
Offline
SMTP isn`t really supported too well in Maian Greetings, one of many areas out of date.
You should enable the mailer and then modify the 'send_mail' function in the 'classes/class_generic.php' file and add in the following:
$MAILER->SMTPAuth = true;
$MAILER->Host = 'XXX';
$MAILER->Username = 'XX';
$MAILER->Password = 'XX'
$MAILER->Port = 'XX';
Add correct values where applicable.
Offline
Looks like that does not work, David.
All it achieves is that the script "hangs" on the preview screen.
Also, I only have a class_generic.inc.php, not class_generic.php.
Thanks.
Offline
Yes, thats the file. Maybe it not connecting to the smtp server? Not sure. You could try downloading the latest version of the php mailer and replacing the 'classes/class.phpmailer.php and class.smtp.php' files and then trying again.
Offline
You could try downloading the latest version of the php mailer
Where do I find that one?
Offline
http://phpmailer.worxware.com/
Offline
Thank you for that, David.
Downloaded the latest version from thesit.
Brrrrrrrrr, looks complicated.
Thanks.
Offline
Its not so bad. You need to replace the two files in the script and ignore the rest. If you are running PHP5, use the PHP5 versions. Also, check your error log to see if the reason for not connecting is logged.
Offline
Do you mean "class.phpmailer.php" and "class.smtp.php" when you say "the two files"?
Thank you.
Offline
Yes.
Offline
I have replaced the 2 files, but that has not made any difference.
Do I have to change any values anywhere after i have replaced the files?
And do i still have to make those changes in class_generic.inc.php?
Thanks.
Offline
I have replaced the 2 files, but that has not made any difference.
Do I have to change any values anywhere after i have replaced the files?And do i still have to make those changes in class_generic.inc.php?
Thanks.
Yes, the changes will still be required.
Offline
OK.
And do I not have to change anything in the 2 new files?
The odd thing is, when I make the changes to the class_generic.inc.php file, that is when the script hangs on the preview page.
Also, I see "localhost" mentioned a few times, do I leave that as it is?
And, my email client (using IMAP) has set my gmail smtp server to port 465, do I use that in the script too, or do I stick to port 25?
Told you it looked quite complicated ![]()
Offline
No, you need to use exactly the Gmail smtp server settings. Localhost is mentioned in other places, but that doesn`t matter. Data passed into the class takes priority.
Offline
OK, David.
Thank you for that.
I have also seen there is a file "use_gmail.txt".
The txt file looks as follows:
<?php
// example on using PHPMailer with GMAIL
include("class.phpmailer.php");
include("class.smtp.php"); // note, this is optional - gets called from main class if not already loaded
$mail = new PHPMailer();
$body = $mail->getFile('contents.html');
$body = eregi_replace("[\]",'',$body);
$mail->IsSMTP();
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->SMTPSecure = "ssl"; // sets the prefix to the servier
$mail->Host = "smtp.gmail.com"; // sets GMAIL as the SMTP server
$mail->Port = 465; // set the SMTP port
$mail->Username = "yourname@gmail.com"; // GMAIL username
$mail->Password = "password"; // GMAIL password
$mail->From = "replyto@yourdomain.com";
$mail->FromName = "Webmaster";
$mail->Subject = "This is the subject";
$mail->AltBody = "This is the body when user views in plain text format"; //Text Body
$mail->WordWrap = 50; // set word wrap
$mail->MsgHTML($body);
$mail->AddReplyTo("replyto@yourdomain.com","Webmaster");
$mail->AddAttachment("/path/to/file.zip"); // attachment
$mail->AddAttachment("/path/to/image.jpg", "new.jpg"); // attachment
$mail->AddAddress("username@domain.com","First Last");
$mail->IsHTML(true); // send as HTML
if(!$mail->Send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
} else {
echo "Message has been sent";
}
?>Can that be slotted in somewhere?
Also, the file mentions Sender, Subject, Body etc. will it still be possible to send out the pre-made Maian script email templates instead?
Thank you.
PS. I slotted the data as in the above file in the generic_inc.php file (the only difference being I added ssl as authentication), it does now send, but it still seems like it is not sending through my Gmail SMTP server, or do I have to disable PHPMAILER in index.php?
Last edited by Klauwaart (08-02-2012 11:41:40)
Offline
I don`t think you need that code. Not sure why gmail isn`t working, I`m not really too familiar with it myself.
You should leave phpmailer enabled in the index or else it will ignore the smtp settings.
Offline
I have no idea why it is not working neither.
And I can't make heads or tails out of the PHPMAILER help files.
Offline
I have no idea why it is not working neither.
And I can't make heads or tails out of the PHPMAILER help files.
What happens, does it just hang? Do your server error/mail logs give any specific errors?
Offline
No, it does not hang any more.
The script works as normal, it just does not seem to send through my Gmail SMTP server, but through the IP of my hosting provider, as messages to Hotmail addresses still bounce.
I even set the SMTPDebug parameter to 1, but I get no error logs at all, and the errors of my CPanel do not reveal anything.
Offline
Is it a restriction of the provider?
Offline
Not that I know of, they themselves advised me to try and use my Google SMTP server, because Hotmail has blacklisted their IP address.
Offline
Not sure then sorry. I don`t know Gmail well enough to be able to test it myself.
Offline
OK, David.
Thanks anyway.
My provider had told me this morning the script was correct, and they had changed something to the firewall, which should make the script run now, but it still doesn't.
As far as I can understand, the headers of a returned mail tell me the script is still going through PHPMAILER rather than SMTP:
----- This is a copy of the message, including all the headers. ------
Return-path: <webbie@vlaanderen-flanders.org.uk>
Received: from [127.0.0.1] (port=57480 helo=www.vlaanderen-flanders.org.uk)
by gamma.xisto.com with esmtp (Exim 4.69)
(envelope-from <webbie@vlaanderen-flanders.org.uk>)
id 1Rvoea-0003GI-Ma
for paigesnanna@hotmail.co.uk; Fri, 10 Feb 2012 11:28:36 +0000
Date: Fri, 10 Feb 2012 11:28:36 +0000
To: Kolventje <paigesnanna@hotmail.co.uk>
From: Klauwaart <webbie@vlaanderen-flanders.org.uk>
Subject: Klauwaart heeft U een E-kaart gestuurd!
Message-ID: <0be7855e15bc154af6c5f183d3ccc33b@www.vlaanderen-flanders.org.uk>
X-Priority: 3
X-Mailer: PHPMailer 5.2.1 (http://code.google.com/a/apache-extras.org/p/phpmailer/)
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset="iso-8859-1"
X-ACL-Warn: {Offline
No, the PHPMailer adds those tags regardless of what SMTP connection it goes through.
Offline
Or is there a way I can send mail through any other SMTP server (not necessarily Gmail)?
I have noticed, in QIOS Pelican (the newsletter software I use) Gmail refuses to work too.
When i use my ISP's SMTP server (O2), it works with no problem at all.
Offline