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.


No emails sent

Login / Search

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

Fan in training

System emails and registration emails are not being sent because of an error

ocPortal faq reads SMTP is the standard for email but when I edit the fields in Configuration>Site Options to use an smtp host without any authenication I get an error which reads:

PHP NOTICE [8] fwrite() [<a href='PHP: fwrite - Manual'>function.fwrite.php</a>]: send of 8192 bytes failed with errno=104 Connection reset by peer in /home/web/cloudservice360.com/public_html/home/portal/source
s/mail.php on line 543

I have copied this file to sources_module to check out the error which points to the following code:

fwrite($socket,'Date: '.$attractive_date."\r\n");
fwrite($socket,$headers."\r\n");
fwrite($socket,$sending_message);   <<<<< this line has the error
fwrite($socket,"\r\n.\r\n");

The variable $sending_message contains the email body.
Looking at the content, it is a multi-part message in MIME format.
Writing to file it is about 32KB.

I have replaced the $sending_message with my own and the error goes away but I do not recieve any emails fro the system or from the register member process.

Originally I thought to test SMTP with another app which works fine with the same SMTP settings.
Tried settings with CodeIgnitor mail class and that also works fine, so I am thinking it  is an ocPortal problem.  I am using the latest ocPortal version.

Does anyone know what the problem is and how to fix?
Back to the top
 
Posted
Rating:
#73655
Avatar

You're a lucky chap, I've written an addon for you that replaces ocPortal's mailer with Swift Mailer. I tested it with gmail (due to it's need for SSL and auth) which is always a tricky one to connect to, and it seems to work perfectly.

Attachment


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:
#73675

Non-joined user

Just what I am looking for, downloaded and tested the add on and works great.
Btw, there is an error when I untar swift mailer folder in your download so I re-downloaded it from their site.

The email sent are a bit messy, how can I change them for my own purposes?
Is there a global template for all emails sent out?
Back to the top
 
Posted
Rating:
#73679
Avatar

Just what I am looking for, downloaded and tested the add on and works great.
Btw, there is an error when I untar swift mailer folder in your download so I re-downloaded it from their site.

That's odd, it's the same file and downloaded okay for me when I just tested. Never mind, glad it works now for you :).

The email sent are a bit messy, how can I change them for my own purposes?
Is there a global template for all emails sent out?

I'm not supposed to do free support (just bug fixes, which the addon counts as; you may want to top up some support credits), but because I'm feeling nice here's your answer…

There's a template 'MAIL' that can be customised. Otherwise it uses the site's own CSS.


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:
#73703
Avatar

Honoured member

Is this better mailing "standard" now in ocportal - as in I can download one of the ocp installers and it will already be in there?

Maybe it can be uploaded to the ADD ONs section of this site?


Chris what I'm saying here is 1 offs happen and they're usually buried in the forum somewhere instead of some where more useful like ADD ONs or PATCHES.  I realize the patches section doesn't exists, but maybe it should… I page that shows versions and patches/fixes broken out by version.

Thank You for the 1 offs, patches, fixes, support, feature releases, free CMS software, and listening.

Back to the top
 
Posted
Rating:
#73705
Avatar

This was added to the addons yesterday :).
I would like to file bug fixes better, but don't have the resources (=time) unfortunately.


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:
#73712
Avatar

Honoured member

Thank You!

 :thumbs:
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: