June 4, 2013 at 4:18 am
pinakid4u (6/3/2013)
would this code runs on mysql successfully, please help me.
No.
Please, remember this is an MS SQL forum. You better ask this question on a MySQL forum in order to get a more informed reply.
June 4, 2013 at 5:15 am
because my Google-Foo is strong, I Gave "mysql send email" a try.
That lead me to a link on the MySQL forums, and a subsequent link to a Visual Studio project someone posted as an example.
While that uses really old style CDO, you could easily adapt it to use the more updated methods in .NEt, which are really easy to use via a programming language.
Dim message As New System.Net.Mail.MailMessage(strFrom, strTo)
message.Subject = ""
message.Body = Me.txtPhoneMessage.Text
message.IsBodyHtml = False
Dim emailClient As New System.Net.Mail.SmtpClient(strSMTPServer)
Dim SMTPUserInfo As New System.Net.NetworkCredential(strSMTPUser, strSMTPPass)
emailClient.UseDefaultCredentials = False
emailClient.Credentials = SMTPUserInfo
Try
emailClient.Send(message)
Catch ex As Exception
MsgBox(ex.Message)
End Try
http://forums.mysql.com/read.php?99,33635,258189#msg-258189
For anyone interested, I have created a c++ user defined function that can send mail without having to have SMTP installed on the server. It uses Microsoft's CDO to relay via any SMTP server.Usage:
Compile this project (http://www.divshare.com/download/7121306-6e1) using Visual Studio Express and place the DLL in the /lib/plugins directory. In MySQL;
create function SendMail returns string soname 'SendMail.dll';
select SendMail('to@address','from@address','Subject','Message','smtp.domain');
Lowell
Viewing 2 posts - 16 through 16 (of 16 total)
You must be logged in to reply to this topic. Login to reply