Joomla Sendmail() causes 504 Gateway Time-out in siteground - joomla

I am using JEvent to create the event.
In the Event detail page, I am sending the email invitation to the 200 user.
When send 200 email using joomla sendMail()
($this->sendMail($user->email, $user->name, $iuser->email,
$subject, $message, 1, null, $bcc);)
I am getting Gateway Time-out error.
The Error message as follow:
Gateway Time-out "The Gateway did not receive a timely response from
the upstream server or application."

Related

Ngrok returns 405 Method Not Allowed while tunneling my localhost (Laravel)

Currently working on SMS API retrieving Post request report after sending sms messages. After sending the report and try to callback the report through the API Middleware. After sms messages sent, Ngrok returns 405 Method Not Allowed.
Ngrok return
Callback Link Set
Api Middleware
Your route is defined as POST request. But your image shows GET request. Either change the request method as POST or change route definition as Route::get.

SonarQube doesn't send notification to Discord webhook

I want notification on my discord app after completing every scan in sonarqube. I have tried to configured my discord webhook URL in sonarqube webhook option but it getting 400 error code after scanning the code and not sending notification.
Steps i tried :
Created webhook URL from my discord chennel.
Configured that webhook URL in sonarqube > Administration > Configuration > Webhooks.
Run code scan So that it send notification to configured webhook.
But i am getting below error.
Error :
Last delivery of Spidey Bot
Response: 400
Duration: 186ms
Payload: .....
Discord webohook screenshot attached
SonarQube Error screenshot attached
It turns out, request body format which SonarQube sends to Discord is not acceptable. It leads to bad request error. Below is logged response from Discord,
{
"message": "Cannot send an empty message",
"code": 50006
}
To successfully post the message it must be in the specific format documented https://discordapp.com/developers/docs/resources/webhook#execute-webhook
The solution to this could be a mediatory URL which parses the request body and hits Discord Webhook with excepted body params.

Permanent failure when sending mail using mailgun

I have a mailgun account I use to send mails on my site (domain.com) when someone signup, I then created another site on my subdomain (subdomainname.domain.com). However when I try to send mail from the subdomain site (subdomainname.domain.com) I get a permanent failure log in my mailgun account, and the email is not delivered. Please how can I solve this issue ? The mails sent from the main domain (domain.com) is delivered successfully.
The errors I get are :
02:13 PM Failed: postmaster#mg.agroexpresslink.com → ewomaukah#outlook.com 'Witskids:Activate Your Account' Server response: 550 550 5.7.0 (COL004-MC2F27) Unfortunately, messages from (209.61.151.224) on behalf of (yahoo.com) could not be delivered due to domain owner policy restrictions.
01/26/17 08:00 AM Failed: postmaster#mg.agroexpresslink.com → ewomaukah#gmail.com 'Witskids:Activate Your Account' Server response: 550 550 5.7.1 Unauthenticated email from yahoo.com is not accepted due to domain's 5.7.1 DMARC policy. Please contact the administrator of yahoo.com domain if 5.7.1 this was a legitimate mail. Please visit 5.7.1 https://support.google.com/mail/answer/2451690 to learn about the 5.7.1 DMARC initiative. d72si348434oic.133 - gsmtp
01/25/17 02:02 PM Failed: postmaster#mg.agroexpresslink.com → ewomaukah#yahoo.com 'Witskids:Activate Your Account' Server response: 554 554 5.7.9 Message not accepted for policy reasons. See https://help.yahoo.com/kb/postmaster/SLN7253.html
I found the solution to the problem, I changed the sender email from 'ewomaukah#yahoo.com' :
\Mail::send($view ,$data,function($message) use($user, $subject, $email){
$message->from('ewomaukah#yahoo.com','witskids');
$message->to($email, $user->firstname );
$message->subject( $subject);
});
To my domain :
\Mail::send($view ,$data,function($message) use($user, $subject, $email){
$message->from('noreply#agroexpresslink.com','witskids');
$message->to($email, $user->firstname );
$message->subject( $subject);
});

How to customize error message sent to an end-user when bot's endpoint is unavailable?

If a user sends message to a bot while it's endpoint is unavailable or failed processing the message, the user receives an error message from Bot Connector, which seems like that:
POST to {SomeArbitraryBot} failed: POST to the bot's endpoint failed with HTTP status 502
or
POST to {SomeArbitraryBot} failed: A task was canceled.
etc.
Is there a way to customize logic of sending error message or to suppress it at all in such a case?
UPDATE
I posted a corresponding issue at Bot Builder GitHub repository.

How can i resend SMS with Twilio api?

I am trying use Twilio api to send SMS to my customers. When i use trial account, i'm using this code:
<?php
require('Services/Twilio.php');
$account_sid = '{my_sid}';
$auth_token = '{my_token}';
$client = new Services_Twilio($account_sid, $auth_token);
$callback=$client->account->messages->create(array(
'To' => "+84974366xxx",
'From' => "+14845280xxx",
'Body' => "hello world",
));
print_r($callback);
?>
The sms i received had "Send from twilio trial account" before "hello world". Now i upgraded my account and test this code again. It's still respone successfully, but my phone number isn't receive SMS. Now how can i check status of $callback and resend sms?
You can make use of the status call back parameter.
This allows you to configure a url that Twilio will call, in this you will receive various details about the action that you configured it with. For sms, you can expect status values like failed, sent, delivered that is just to mention a few. you can then use these values to determine if further action is required, such as resend the message and so on.
for more details I suggest looking at the Twilio message api here
https://www.twilio.com/docs/api/rest/sending-messages#post-parameters-optional
I hope this helps

Resources