Automated Email

Discussion in 'PHP' started by Cheryl399, May 21, 2010.

  1. #1
    Hello everyone,

    I have a website with a form which when user submits updates the database that i have which is access 2007. However i wanted to be able to send an automated email to say that it has been updated, ive tried looking for some PHP scripts that could help me out but couldnt find a decent one.

    If someone was able to point me in the right direction then i would appreciate that

    Thank you :)
     
    Cheryl399, May 21, 2010 IP
  2. kaleshwar

    kaleshwar Peon

    Messages:
    43
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    one word PHPMailer
    sourceforge.net/projects/phpmailer/
     
    kaleshwar, May 21, 2010 IP
  3. iama_gamer

    iama_gamer Active Member

    Messages:
    404
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #3
    What language do you use for your website?
     
    iama_gamer, May 21, 2010 IP
  4. Cheryl399

    Cheryl399 Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Iam using ASP for the database and HTML for the appearence of the web pages

    Okay thanks kaleshwar i will look into that
     
    Cheryl399, May 21, 2010 IP
  5. muzaffar

    muzaffar Peon

    Messages:
    31
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Hi! This code might help you. Remember, I am using IIS 7.0 to run this script.


    sendUrl="http://schemas.microsoft.com/cdo/configuration/sendusing"
    smtpUrl="http://schemas.microsoft.com/cdo/configuration/smtpserver"

    ' Set the mail server configuration
    Set objConfig=CreateObject("CDO.Configuration")
    objConfig.Fields.Item(sendUrl)=2 ' cdoSendUsingPort
    objConfig.Fields.Item(smtpUrl)="relay-hosting.secureserver.net"
    objConfig.Fields.Update

    ' Create and send the mail
    Set objMail=CreateObject("CDO.Message")

    ' Use the config object created above
    Set objMail.Configuration=objConfig
    objMail.From="jobs@jobads.pk"
    objMail.To=Request("email") 'This can be taken from database
    objMail.Subject="This is subject"
    objMail.TextBody="This is message"
    objMail.Send

    I hope, this script will work to send auto emails.
     
    muzaffar, May 21, 2010 IP
  6. roopajyothi

    roopajyothi Active Member

    Messages:
    1,302
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    80