Cannot use SMTP for reset password and send email

Hello, it has been a while since I managed to set up Gibbon for my school. With the increasing demand for sending emails, I really want to use the email feature properly. I can not use the forget password and message feature even I have filled in the “third party setting”. I am 100% ensured my SMTP is set correctly, as I ran it all well on my phone and Windows.

So please offer some ideas, I am happy to wait for the answer,

I appreciate it all.

Hello! Under v23 there is an option test emails ending in the Third Party Settings page. What result do you get from this? All email sends should be logged under Admin > System Admin > View Logs: can you see any related errors here, using the Title filter to narrow down to “Email Send Status”? Thanks! Ross

Hello Ross,

I was using the Message feature to try to send out the email. The funny thing is I got the email but it just reply from my email address(Sender). I checked the log according to your way.
It stated:
pID 0
status Complete
output {“return”:“success0”,“emailCount”:1,“emailErrors”:[],“smsCount”:0,“smsBatchCount”:0}
class Gibbon\Module\Messenger\MessageProcess
method runSendMessage
key 287254f2fad141297194d2fc12b4efd6
data [“27”,“026”,“0000000001”,“001”,{“address”:“\/modules\/Messenger\/messenger_post.php”,“email”:“Y”,“from”:"it@bisgz.com",“emailReplyTo”:"bhuang@bisguangzhou.onmicrsoft.com",“messageWall”:“N”,“subject”:“111”,“body”:“<?xml encoding=\"utf-8\" ?>

2121

----
<span style="font-weight: bold; color: #447caa;">Butters Huang<\/span>
<span style="font-style: italic;">BIS
<\/span>----<\/p>”,“emailReceipt”:“N”,“individualNaming”:“Y”,“role”:“N”,“roleCategory”:“N”,“yearGroup”:“N”,“formGroup”:“N”,“course”:“N”,“class”:“N”,“activity”:“N”,“applicants”:“N”,“houses”:“N”,“transport”:“N”,“attendance”:“N”,“group”:“N”,“individuals”:“N”}]

Many thinks to your help.

Butters

Hi Butters,

OK, so it looks like it is now working, which is good news : ) In terms of the reply address, by default, Gibbon will send from the email address registered in your account.

However, there is an extra permission in this module called New Message_fromSchool, which you can see under Admin > User Admin > Manage Permissions. If you assign to this permission to your role (it is on for Admin by default), you’ll see not only the option to send out from the school’s Organisation Email address (set in Admin > System Admin > System Settings), but also the option to set a different reply address, should you wish to do so:

Cheers,

Ross

Hello Ross,

Sorry, Ross, I should provide more information about that. The email did not send out. Whatever I put any email address on blank of “Reply to”, it sends back to my email address(sender). This scenario is based on my primary email domain name supplier.

I also changed to my secondary email domain: which is Office365 as picture showed <img

It did not send out. Here is the log info:

pID 0
status Complete
output {“return”:“success0”,“emailCount”:1,“emailErrors”:[],“smsCount”:0,“smsBatchCount”:0}
class Gibbon\Module\Messenger\MessageProcess
method runSendMessage
key f4fdc2c465be036e90e644a6515f29f6
data [“30”,“026”,“0000000001”,“001”,{“address”:“\/modules\/Messenger\/messenger_post.php”,“email”:“Y”,“from”:"bhuang@bisguangzhou.onmicrosoft.com",“emailReplyTo”:"it@bisgz.com",“messageWall”:“N”,“subject”:“13123131”,“body”:“<?xml encoding=\"utf-8\" ?>


2313122313
----
<span style="font-weight: bold; color: #447caa;">Butters Huang<\/span>
<span style="font-style: italic;">BIS
<\/span>----<\/p>”,“emailReceipt”:“N”,“individualNaming”:“Y”,“role”:“N”,“roleCategory”:“N”,“yearGroup”:“N”,“formGroup”:“N”,“course”:“N”,“class”:“N”,“activity”:“N”,“applicants”:“N”,“houses”:“N”,“transport”:“N”,“attendance”:“N”,“group”:“N”,“individuals”:“N”}]

Looks like the system called “send out”, but actually did not send out.

For Microsoft365 they used Encryption: STARTTLS . Gibbon does not have it, so I used TLS.

Thanks

Ross

Hi Butters, thanks for clarifying : ) It looks as if the SMTP server is accepting the message, but for some reason then not delivering it onward. Is it possible to check a log on the Microsoft side to see if ther eis any indication there?

This article gives some interesting background on TLS and STARTTLS, which although they sound similar are not: one is a protocol, the other is a command. This is why you don’t see STARTTLS as an option in Gibbon.

Cheers,

Ross

Hello Ross, thanks for the suggestion. The article you gave me seems not accessible. It is fine. I read some of the posts in the forum, and you mentioned Gibbon was using PHPMailer to send out the email before. I look at the PHPmailer solution yesterday even I am not a PHP person. I found I may miss the “cert.pem” in the directory: /usr/lib/ssl/cert.pem According to the picture.

I did not find out any .pem certificate file in the target directory.

I also check with php.ini, and find out my OpenSSL also got nothing there. As picture showed.

Sorry, some of the points may not be right, I just want to try my best to figure out the question. Hoped that I did not bring any inconvenience to you.

Hi Butters, I’ve never had to play with certificates specifically for PHPMailer, as it seems to work out of the box. It looks like you are using Ubuntu, which is our Linux flavour of choice.

Out of interest, are you using HTTP or HTTPS for your Gibbon installation? If the former, that might causing the issue, and I’d recommend you use Certbot+Let’s Encrypt to switch to HTTPS:

https://certbot.eff.org/lets-encrypt

I’m going to tag @fvlasie here, as I believe he has Microsoft+Gibbon experience, and so might be able to help.

Thanks,

Ross

Hello Ross,

I am using HTTPS for Gibbon. I will be waiting for any new progress here.

Thanks,

Butters

Hi Butters,

That sounds good. At this point I’d strongly suggest you check your Microsoft logs. There is not much else we can do at this point, as we don’t have a Microsoft domain to use, and as far as we know this works for other users. Let’s see what FV says.

Cheers,

Ross

Hello Butters and Ross!

Butters, have you tried setting the SMTP Encryption to Automatic?

In the lines sent from the log file it included the following lines which I’m putting in quotes:

“data [“27”,“026”,“0000000001”,“001”,{“address”:”\/modules\/Messenger\/messenger_post.php",“email”:“Y”,“from”:"it@bisgz.com",“emailReplyTo”:"bhuang@bisguangzhou.onmicrsoft.com",“messageWall”:“N”,“subject”:“111”,“body”:“<?xml encoding=\"utf-8\" ?>”

Notice the emailReplyTo part lists onmicrsoft.com which I think should be onmicrosoft.com (with an added o in the micro part of the email address). In the screenshots, it seems to be spelled the way I would expect. So if this is the problem, it is misspelled somewhere else in the data, possibly in the bhuang email field in his user record, the it@bisgz.com user record, or more likely the system email ReplyTo configuration.

I hope this helps.
– Glenn

Hello fvlasie,

I tried, not work. In most cases, it sends out the email back to my sender’s email address, and the email is not really sent out.

Thanks

In the lines sent from the log file it included the following lines which I'm putting in quotes:

“data [“27”,“026”,“0000000001”,“001”,{“address”:”\/modules\/Messenger\/messenger_post.php",“email”:“Y”,“from”:"it@bisgz.com",“emailReplyTo”:"bhuang@bisguangzhou.onmicrsoft.com",“messageWall”:“N”,“subject”:“111”,“body”:“<?xml encoding=\"utf-8\" ?>”

Notice the emailReplyTo part lists onmicrsoft.com which I think should be onmicrosoft.com (with an added o in the micro part of the email address). In the screenshots, it seems to be spelled the way I would expect. So if this is the problem, it is misspelled somewhere else in the data, possibly in the bhuang email field in his user record, the it@bisgz.com user record, or more likely the system email ReplyTo configuration.

I hope this helps.
– Glenn

I upgraded to V23 now, I tried to use the new feature “Test Email”, and I could send it out successfully, but the same thing happen the receiver did not actually receive the email.

Hello,

As Glenn suggested, checking bisguangzhou.onmicrsoft.com as the domain, which looks like it should be bisguangzhou.onmicrosoft.com might help, but it sounds like this is an issue with all email addresses…but maybe they all have this spelling issue?

Otherwise, have you tried checking any logs on the Microsoft side, as suggested previously? If Gibbon thinks they are being sent out, then the issue might be upstream, and so Gibbon might not have any information about it.

Thanks,

Ross

Hello Ross,

I checked, and I ensured that the spelling is correct when I set it.

I need to find out how to check the logs on the Microsoft side, it may spend time, if I finally can not find out will let you know.

I tried to change to my primary email-server SMTP provider, having the same problem. I could receive the successful notification on my email, but the target receivers are not receiving it.

Kind regards,

Butters

Hello Ross,

New things getting on!!! I could receive the reset password link now. But still same on “Message”

Kind regards,

Butters

Hi Butters,

It is interesting to hear that you are making some progress. Let us know how it goes! Unfortunately I can’t help you on finding the log on the Microsoft side, as it is not a platform I’ve any experience with.

Cheers,

Ross

Hello Ross,

I decided to sort the information for you so far that I knew.

First, I set up my Microsoft mail like this:

Second, going to function "message ", set up the message as picture showed:

The replying Email:472516981@qq.com did not receive any mail. For it@bisgz.com, it comes the mail with this:

Go to the microsoft mail admin, using trace message function, go to “Messages sent from my primary domain in the last day”, all messages are delivery, I choose the mail I just send out, will be like this:

I didn’t read any fail messages in the mail flow in Microsoft site. Also I didn’t find out my target email address:472516981@qq.com even in “Messages sent from my primary domain in the last day” in the Mircrosoft site.

Kind regards,

Butters

Hi Butters, thanks for the update. It looks like your email infrastructure is well set up and working as expected.

The next thing to do, when using Messenger, is to check that the message is going to the users you expect it to. You can do this using the Send Report, as shown below:

Does this reveal anything new to you?

Thanks,

Ross