php to send email

Discussion in 'PHP' started by red_fiesta, Jun 1, 2007.

  1. #1
    How is the best way to send email with php from a remote server?

    Before i have used asp and code..


    SET objMail = Server.CreateObject("SMTPsvg.Mailer")
    
    IF sFormat = "text" THEN
    objMail.CharSet = 2
    Else
    objMail.ContentType = "text/html"
    End If
    
    If sImportance = "high" Then
    objMail.Priority = 1
    ElseIf sImportance = "low" Then
    objMail.Priority = 5
    Else
    objMail.Priority = 3
    End If
    
    objMail.FromName = sFromName
    objMail.FromAddress= sFromAddress
    objMail.RemoteHost = sMailServer
    objMail.Subject = sSubject
    objMail.BodyText = sContent
    objMail.AddRecipient sToName, sToAddress
    objMail.AddCC sFromName, sFromAddress
    
    objMail.SendMail 
    Code (markup):

     
    red_fiesta, Jun 1, 2007 IP
  2. manilodisan

    manilodisan Peon

    Messages:
    224
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    mail(), sendmail, SMTP...There are lots of ways to send email using PHP. For a low amount of email/day I would recommend you to send them using SMTP authentication.
     
    manilodisan, Jun 1, 2007 IP