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