HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


error sending site email...

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#91794 (In Topic #18443)
Avatar

Community saint

Was testing logging on as a new user, got "A system e-mail could not be sent. This error may be preventing staff e-mail notifications, so please contact the staff manually to inform them of the problem." …

any way to see what happened or what the issue might be?


Paul
Back to the top
 
Posted
Rating:
#91798
Avatar

The error log (Admin Zone > Audit > Error log) should show whatever error PHP's mail function returned.

Usually it is Windows servers that have problems, and the bettermail addon is a good solution.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#91800
Avatar

Community saint

No errors in the error log.    Server is linux.

I uploaded the following script and ran it, it sent without error.

Code (php)

<?php
 $to = "recipient@example.com";
 $subject = "Hi!";
 $body = "Hi,\n\nHow are you?";
 if (mail($to, $subject, $body)) {
   echo("<p>Message successfully sent!</p>");
  } else {
   echo("<p>Message delivery failed...</p>");
  }
 ?>
 

investigating further..

Paul
Back to the top
 
Posted
Rating:
#91801
Avatar

Community saint

I went to sources/mail.php

Down around like 640 or so, seems to be the code to use mail() if the other method is not configured… I added in:

Code

echo "to:".$to_line."<br/>";
         echo "tsub:".$tightened_subject."<br/>";
         echo "headers:".$headers."<br/>";
         echo "lineterm:".$line_term."<br/>";
         echo "add:".$additional."<bg/>";

to see what it is sending….

I typed in a fake name to register, and get:

Code

to:"RawDawg"
tsub:Activate your new account at DownwardSlide
headers:From: "DownwardSlide" Reply-To: <> Return-Path: X-Sender: Message-ID: X-Priority: 3 X-Mailer: ocPortal MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ocPortal5060f8ad236ae_1"
lineterm:
add:-f contact@downwardslide.com

It seems it's putting name, not email into the to field… or missing the email.

Paul
Back to the top
 
Posted
Rating:
#91802
Avatar

Community saint

nevermind about the to…  the browser just doesn't pick up the <name@blah.com>, it thinks it's a tag.

Of note, I copied all the data it sends out headers and all, into that little bit of code, it doesn't work there either.

Now if I can just remember where I set the email stuff and set it to text, perhaps it's all too big with 'images'.

Paul
Back to the top
 
Posted
Rating:
#91803
Avatar

Community saint

tried send links instead of images… no go.

set up smtp…  get "SMTP authentication not supported (220 and/or bulk e-mail. )"

Strange, mail on my other OCP site works fine… same server.

Paul
Back to the top
 
Posted
Rating:
#91804
Avatar

Community saint

I put in a manual send, and just removed bits until it worked..

The one that works is

Code

mail("contact@air-rc.com",$tightened_subject,'',$line_term.$sending_message,$additional);

So $headers is the one that causes the mail to get an error, it is:

Code

From: "DownwardSlide" Reply-To: <> Return-Path: X-Sender: Message-ID: X-Priority: 3 X-Mailer: ocPortal MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ocPortal50611601b4310_1"

Paul
Back to the top
 
Posted
Rating:
#91807
Avatar

Community saint

I can't believe how much time I wasted on this one… I ended up taking the file from my air-rc.com site, and using it, and mail worked fine…

My 'old one' which I believe is 9.02 as well, has mail_wrap($subject_tag … whereas the one that wasn't working was mail_wrap($subject_line …

That isn't what seems to make the difference though…  further down in the new one you did some comparison to 'WIN' or some such, the old one didn't do that, and the old one sent message then header in order, where the newer one had a '' for message and everything cat'ed together for header ..

Paul
Back to the top
 
Posted
Rating:
#91819
Avatar

the old one sent message then header in order, where the newer one had a '' for message and everything cat'ed together for header ..

We changed that just recently to workaround a bug in some PHP configurations.

If you change just that line back to:

Code

$worked=mail($to_line,$tightened_subject,$sending_message,$headers,$additional);
does that fix it?

I wonder if the following line would work:

Code

$worked=mail($to_line,$tightened_subject,"\t",$headers.$line_term.$sending_message,$additional);


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: