[我正在SIDDIH中设置一个smtp服务器,我使用smtp.gmail.com和我的用户名和密码,并且启用了“访问不太安全的应用程序”选项
我将显示代码,但使用我的电子邮件帐户和密码
@Source(type = 'http',
receiver.url='http://0.0.0.0:8006/thresold',
basic.auth.enabled='false',
@map(type='json'))
define stream TransactionStream(creditCardNo string, country string, item string, quantity int, price double);
@sink(type='email',
mail.smtp.starttls.enable = 'true',
username ='testuser',
address ='[email protected]',
password= 'xxxx',
subject='Alert for large value transaction: cardNo:{{creditCardNo}}',
to='[email protected]',
port = '587',
host = 'smtp.gmail.com',
ssl.enable = 'false',
auth = 'true',
@map(type='text'))
define stream AlertStream(creditCardNo string, country string, item string, quantity int, price double);
@info(name='query1')
from TransactionStream[quantity * price > 5000]
select *
insert into AlertStream;
我收到错误消息:“必须先发出STARTTLS命令”我正在尝试Siddih单一模拟,并通过http发布部署和发送参数我希望能够通过smpt服务器发送电子邮件而不会出现错误。
我已经尝试使用以下接收器配置,并且有效。请相应地更改并试用。请使用正确的值更新用户名,密码,地址和属性。
@sink(type = 'email', username = "${EMAIL_USERNAME}",
address = "${SENDER_EMAIL_ADDRESS}", password = "${EMAIL_PASSWORD}",
subject = "Upgrade API Subscription Tier", to = "{{userEmail}}",
host = "smtp.gmail.com", port = "465", ssl.enable = "true", auth = "true",
@map(type = 'text', @payload("XYZ")))