简体   繁体   English

如何在log4j2 SMTP附加程序中使用sendgrid?

[英]How to use sendgrid with log4j2 SMTP appender?

I tried log4j2 SMTP appender with my gmail configuration and it worked well. 我在我的gmail配置中尝试了log4j2 SMTP附加程序,并且效果很好。 But sendgrid doesn't give any SMTP like configurations. 但是sendgrid没有提供任何类似SMTP的配置。 We have apikey. 我们有apikey。 Please help. 请帮忙。

You can use your API key to send via SMTP . 您可以使用API​​密钥通过SMTP发送 For SMTP username use the string apikey and put your API key in as the password. 对于SMTP用户名,请使用字符串apikey并将您的API密钥作为密码输入。 Host is smtp.sendgrid.net and you can use several ports but 587 is recommended. 主机为smtp.sendgrid.net ,可以使用多个端口,但建议使用587。 More info . 更多信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM