Mail sending fails without errors - laravel-5.5

What do I have:
Laravel app (5.5.45)
Mailgun
I send mail like this:
//App\Listeners namespace
Mail::to($event->user)->send(new Report($event->report));
There are no errors in app logs. And there are no incoming mail in the Mailgun dashboard. And, obviously, no mail on my mailbox (spam too).
I'm using debug bar, and when email sending is triggered, my mail appears in the debug bar.
What have I tried:
composer update
Delete Mailgun domain and create a new one
php artisan config:cache
Use Mailgun sandbox domain
Serve my Laravel app via HTTPS and HTTP
Nothing helped.
Question: how can I debug mail senging in other ways? I know about Mailgun webhooks, but I can set up a webhook for my local app.
P. S. When I'm sending mail using curl, everything is ok. So, I can say that my api keys are ok.
Edit 1:
dd(Mail::to(...));
returns null.
Edit 2: everything is ok when sending via SMTP.

From Laravel 5.3V Notify system feature is introduced try this
https://laravel.com/docs/5.4/notifications

Related

I've updated CF9 mail server settings but my application is still trying to use the old mail server

We changed our exchange mail server so I've update the mail server in CF9 admin settings. I've verified that it can connect to the new server and it can. But when I test sending an email it keeps failing because it is trying to connect to the old mail server. When I look in the mail.log it clearly lists the old server as the SMTP host it is trying to connect to and it fails.
Where else could CF9 be pulling the old mail server from?
Are there other places where my predecessor could have coded in the old mail server?
I've looked in various .cfm files for any reference to the old exchange server but have found none.
Thanks,
Dan
Ok so what I ended up doing was to actually hard code the new server into the one location we are actually using a cfmail tag. That fixed it. Not much of a chance this app will ever do anything other than this so should be fine.
Dan

How to fix "Could not get any response" in Postman?

Postman for Linux
Version 6.7.1
Deepin x64
I'm trying to test a get method on postman to test my code, but I always get this error message.
Could not get any response.
There was an error connecting to localhost:3001/blocks.
Why this might have happened:
The server couldn't send a response:
Ensure that the backend is working properly
Self-signed SSL certificates are being blocked:
Fix this by turning off 'SSL certificate verification' in Settings > General
Proxy configured incorrectly
Ensure that proxy is configured correctly in Settings > Proxy
Request timeout:
Change request timeout in Settings > General
I've tried to do almost everything from this topic ("Could not get any response" response when using postman with subdomain) but nothing seems to work.
This is the on the message console.
Postman Console Message
Someone can help me to fix this?
In Postman go to Postman-> Preferences and in the settings tab turn off SSL certificate Verification
my project work try this:
Restart your web server local ex: wamp, postgree, oracle
in postman setting :
Trim keys and values in request body OFF
Use next generation URL processing ON
SSL certificate verification OFF
Always open request in web tab OFF
Send no cache header ON
Send postman token header ON
Retain headers when clicking on links OFF
Automatically follow redirects ON
Send anonymous usage data to postman OFF
It works for me:
Restart your web server like: PostgreSQL, Oracle
it will work

Ruby on Rails Mailer - Sending with correct message-id

I am using Ruby on Rails 4, I own my own webserver with domainname, but use a local maschine to send mails.
I send mails via SMTP (ActionMailer::Base.smtp_settings = {..settings..})
To my question: Is it possible to send mails with the message-id that is like ...#example.com (my domainname) and not like ...#localhostname.mail?
And if I cannot get it from SMTP (or how ever those message-ids are generated) could I just override the message-id-header so that abcd#localhostname.mail becomes abcd#example.com? Or does that mess something up? For example when I send a mail from my system and another from my normal mail program.
Thanks in advance
There are settings for your SMTP server software (postfix?) to set a domain name so it doesn't use your local hostname. You should go through the documentation of your SMTP software to find out which setting this is (sorry, I'm not a real email expert).

Sending Text Messages (SMS) With ColdFusion And CFMail

I'm building a web application that needs to send notifications by SMS. As ColdFusion itself provides an SMS Service, can I use the same for sending SMS without using any 3rd party SMS Gateway Service like Clickatell?
I have found some information at Ben Nadel's website but it is not working,
Sending Text Messages (SMS) With ColdFusion And CFMail
I have tried the following code,
<cfmail to="9567102323#ideacellular.net" from="9567102323" subject="New Message" type="text">
<cfmailpart type="text/plain">Hello huan, this is a test message</cfmailpart>
</cfmail>
As guessed by Miguel in the comments, your code will not give the desired result because the from attribute of your cfmail tag is not a valid email address. Your ColdFusion code will execute without error but the mail will not be sent. The mail file will appear in the Undelivr folder of a path resembling this: yourlocalsystem\JRun4\servers\cfusion\cfusion-ear\cfusion-war\WEB-INF\cfusion\Mail.
For the code in your question, add "#ideacellular.net" to the from attribute of your cfmail tag. From here, I'm a little uncertain. If that mail goes to the Undelivr folder it might have something to do with your mail server only being able to send mail from certain domains. I have vague recollections of stuff like that happening to me.
You can't send SMS direct from ColdFusion, does not have this capability, just like ColdFusion does not have a built-in mail server. cfmail tag makes it easy to communicate with a mail server, but it does not send emails itself.
Regarding SMS, ColdFusion makes it easy to work with SMS gateways, look at CF docs for "SMS Event Gateway" and sendGatewayMessage().

Can I restrict cfmail to only send mail from a given domain using cf admin

We have had issues with our server being used to send spam via cfmail to our remote SMTP server. I cannot see where it is occurring, but the emails are sent from a domain that is not one on our server.
Is there a way using ColdFusion administrator to specify that only emails showing as from someone#mydomain.com are sent to the SMTP host via the spool?
Thanks in advance,
Paul
It sounds to me like the <cfmail> side of things here is a red herring and you have got an open relay on your mail server. You seriously need to disable that immediately! If your SMTP server has to relay email for your CFML app then make sure it's not configured to relay everything, instead just for the IP address of the CF server, or for the credentials the CF server uses to connect to it.
If you don't know how to configure the relaying settings for your SMTP server, raise another question on serverfault.com asking how. Provide the exact details of your SMTP server, as well as the requirement to still allow relaying for the CF server.