yuzd / Hangfire.HttpJob

httpjob for Hangfire,restful api for Hangfire,job调度与业务分离
https://github.com/yuzd/Hangfire.HttpJob/wiki
MIT License
628 stars 185 forks source link

Using sending emails from httpjob #24

Closed gilsoncabacazzo closed 4 years ago

gilsoncabacazzo commented 4 years ago

What do I need to use the sending of emails when an httpjob task was completed, either with errors or successfully.

Attached capture of task settings. Could you give me a help? Thank you Regards

image

yuzd commented 4 years ago

can you check this?(Google Chrome right-click translation)

https://github.com/yuzd/Hangfire.HttpJob/wiki/%E9%85%8D%E7%BD%AE%E9%82%AE%E7%AE%B1%E6%9C%8D%E5%8A%A1%E5%8F%91%E9%80%81job%E6%89%A7%E8%A1%8C%E7%BB%93%E6%9E%9C

gilsoncabacazzo commented 4 years ago

I have already configured the mail server. Are the alerts sent automatically? That is, when a task is completed, is the alert sent? I ask why I did not receive any alerts when the tasks were finished

image

Thanks for the clarification Regards

yuzd commented 4 years ago

@gilsoncabacazzo SendSucMail value default is False..do you set it True?

image

gilsoncabacazzo commented 4 years ago

Yes @yuzd , I have it set to true So far I have only one recipient, is it necessary to separate it with a comma or some other character?

yuzd commented 4 years ago

only one recipient, is not necessary to separate it with a comma or some other character. I suspect there is something wrong with your SMTP server configuration. Can you test your SMTP server with mailkit yourself by write unit test?

gilsoncabacazzo commented 4 years ago

the port is mandatory ?, I have another application in c # where I only pass the server, username and password, and from that application I get emails

yuzd commented 4 years ago

should set port value

image

gilsoncabacazzo commented 4 years ago

I already established the port, who would be the sender of the email ??

1 2 3

gilsoncabacazzo commented 4 years ago

I am registering this exception 2019-10-29 14: 22: 20.6963 | HttpJobDispatcher.InitSmtpClient The SMTP server does not support authentication.   LogExtensions.ErrorException => LoggerExecutionWrapper.Log => AspNetCoreLog.Log

gilsoncabacazzo commented 4 years ago

it already works, the mail server user was incorrectly configured

image

Thank you very much for the help always Regards

yuzd commented 4 years ago

nice