I am trying to use the sink type='email' and I have set up the smtp gmail server in that way:
@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 ='test...@gmail.com',
password= 'xxxx',
subject='Alert for large value transaction: cardNo:{{creditCardNo}}',
to='final_de...@domainx.com',
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;
When I run the application I don't get any error but in the moment I send the data and AlertStream try to send the email with the smtp server I get the error: Must issue a STARTTLS command first