是否有像aspSmarMail這樣的郵件對象,我可以從PHP腳本調用指定'服務器','senderaddress','收件人'等子屬性的郵件對象?例如,在MS的視覺Foxpro9我可以使用此代碼:用於PHP的aspSmartMail對象
loIP = CREATEOBJECT("aspSmartMail.SmartMail")
loIP.server = "mailout.my.domain.com"
loIP.SenderName = "Emailer"
loIP.SenderAddress = "[email protected]"
loIP.Recipients.Add("[email protected]")
loIP.Subject = "Emailer Subject"
loIP.ContentType = "text/html"
loIP.Charset = "us-ascii"
loIP.Body = "This is the body of the email"
loIP.SendMail()
基本上這將中繼生成的電子郵件以「mailout.my.domain.com」郵件服務器和它將被代替送出具有的那種方式在我的本地主機上安裝一個SMTP MTA。
是否有一些語法允許我這樣做?
SwiftMailer是正是我需要的,它完全固定我的問題,請參閱此鏈接以查看有關此問題的完整原始帖子。 http://stackoverflow.com/questions/5869705/php5-mail-function-sendmail-error – sadmicrowave 2011-05-12 18:11:50