SimplePortal

Customization => Custom Coding => Topic started by: Dimand on August 17, 2011, 05:52:49 AM

Title: sendmail function not working with mail queue
Post by: Dimand on August 17, 2011, 05:52:49 AM
Hi. So i am using SMF 2.0 RC4 and simple portal to run my website.
I use alot of custom php pages in SP, some of whitch make use of the sendmail function in subs-post.php

Now, if I have the mail queue disabled, the following code works just fine.

Code: [Select]
global $sourcedir;
require_once($sourcedir . '/Subs-Post.php');
echo sendmail('my_email@gmail.com', 'subject', 'body', 'email@my-site.com', null, false, 1, null, true);

However, when I enable the mail queue. This stops working, it is not even added to the queue.
That said, I can still send emails fine through he queue with the normal mail sending, i.e, email user in sendtopic.php

I got it working outside of SP, so it seems SP is the issue. Still would like to keep using SP. Any idea on a workaround? Otherwise i'm going to have to convert all my SP pages into SMF actions and apart from that been a pain, SP has a much better user access scheme.
Title: Re: sendmail function not working with mail queue
Post by: kak2z on May 17, 2015, 03:51:16 PM
I also have a problem. There is no solution?
Title: Re: sendmail function not working with mail queue
Post by: ♦ Ninja ZX-10RR ♦ on May 17, 2015, 04:18:15 PM
Hi, please don't bump topics that are 4 years old. Usually when sendmail doesn't work it's an host-side issue, check your server error logs if there is anything related to emails not being handled correctly and also check with your host whether the emails are properly configured.
Hint: if you are on let's say Hostgator, 1&1, GoDaddy hosts then those are very much likely being the problem already.
Title: Re: sendmail function not working with mail queue
Post by: kak2z on May 17, 2015, 04:40:57 PM
I run sendmail inside the portal - no letters in the queue.
I connect to the script Ssi - run the script without the portal - Letters are in the queue.
Title: Re: sendmail function not working with mail queue
Post by: ♦ Ninja ZX-10RR ♦ on May 17, 2015, 05:21:47 PM
EDIT: I am editing this post in order to clarify a bit.

I believe you may have misunderstood my last post.
What I was referring to was to check the reason why it doesn't work by checking the server error logs and also by having a word with your host rather than telling me what does work and what doesn't, because I have already understood it ;) (hopefully!)
SimplePortal 2.3.8 © 2008-2024, SimplePortal