How have Trigger's example after insert send to mail on outlook?.

  • 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.

    --------------------------------------------------------------------------
    A little knowledge is a dangerous thing (Alexander Pope)
    In order for us to help you as efficiently as possible, please read this before posting (courtesy of Jeff Moden)[/url]

  • 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


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 2 posts - 16 through 16 (of 16 total)

You must be logged in to reply to this topic. Login to reply