January 11, 2016 at 2:17 pm
We have a sqL job that calls a C#program ( executable ). That executable creates a PDF also sends out an email.
Everything is fine except that we have no way o know whether the job is running every 5 minutes or has got stalled.
So I plan to recreate the executable to send out an email to a GMAIL account everyday.
Then I can check the GMAIL account ( via -Tsql ) to see whether it received a new email.
Can anyone help me with the code part for connecting to GMAIL.COM ( I mean doing a remote login via SQL code )
January 11, 2016 at 2:33 pm
SQL server cannot connect to a POP3/IMAP a server to pull down the mail natively.
you can do it in a programming language like c#/VB.net, which also means you can create a Common Language Runtime(CLR) to do the same.
the code that sends the email in the c# app could capture the return code from the mail server, so you know if any error was returned, like Error 5.7.1 relaying prohibited is returned or whatever. so you can capture it at the moment of sending right there.
you can use google as the SMTP server to send outbound mail, but you cannot check the mailbox.
sending email is a different animal, and i just mention it to be complete.
Lowell
January 11, 2016 at 2:33 pm
That's not a T-SQL question.
"Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho
January 12, 2016 at 7:26 am
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply