Public Member Functions | |
__construct () | |
__call ($sMethod, $aArgs) | |
getConfig () | |
setConfig ($oConfig) | |
send () | |
setSmtp ($oShop=null) | |
sendOrderEmailToUser ($oOrder, $sSubject=null) | |
sendOrderEmailToOwner ($oOrder, $sSubject=null) | |
sendRegisterEmail ($oUser, $sSubject=null) | |
sendForgotPwdEmail ($sEmailAddress, $sSubject=null) | |
sendContactMail ($sEmailAddress=null, $sSubject=null, $sMessage=null) | |
sendNewsletterDbOptInMail ($oUser, $sSubject=null) | |
sendNewsletterMail ($oNewsLetter, $oUser, $sSubject=null) | |
sendSuggestMail ($oParams, $oProduct) | |
sendSendedNowMail ($oOrder, $sSubject=null) | |
sendBackupMail ($aAttFiles, $sAttPath, $sEmailAddress, $sSubject, $sMessage, &$aStatus, &$aError) | |
sendEmail ($sTo, $sSubject, $sBody) | |
sendStockReminder ($aBasketContents, $sSubject=null) | |
sendWishlistMail ($oParams) | |
sendPriceAlarmNotification ($aParams, $oAlarm, $sSubject=null) | |
setSubject ($sSubject=null) | |
getSubject () | |
setBody ($sBody=null, $blClearSid=true) | |
getBody () | |
setAltBody ($sAltBody=null, $blClearSid=true) | |
getAltBody () | |
setRecipient ($sAddress=null, $sName=null) | |
getRecipient () | |
clearAllRecipients () | |
setReplyTo ($sEmail=null, $sName=null) | |
getReplyTo () | |
clearReplyTos () | |
setFrom ($sFromAdress, $sFromName=null) | |
getFrom () | |
getFromName () | |
setCharSet ($sCharSet=null) | |
getCharSet () | |
setMailer ($sMailer=null) | |
getMailer () | |
setHost ($sHost=null) | |
getErrorInfo () | |
setMailWordWrap ($iWordWrap=null) | |
setUseInlineImages ($blUseImages=null) | |
addAttachment ($sAttPath, $sAttFile= '', $sEncoding= 'base64', $sType= 'application/octet-stream') | |
addEmbeddedImage ($sFullPath, $sCid, $sAttFile= '', $sEncoding= 'base64', $sType= 'application/octet-stream') | |
getAttachments () | |
clearAttachments () | |
headerLine ($sName, $sValue) | |
Public Attributes | |
$SMTP_PORT = 25 | |
Protected Member Functions | |
_setSmtpProtocol ($sUrl) | |
_isValidSmtpHost ($sSmtpHost) | |
_getNewsSubsLink ($sId) | |
_includeImages ($sImageDir=null, $sImageDirNoSSL=null, $sDynImageDir=null, $sAbsImageDir=null, $sAbsDynImageDir=null) | |
_getUseInlineImages () | |
_sendMailErrorMsg () | |
_addUserInfoOrderEMail ($oOrder) | |
_addUserRegisterEmail ($oUser) | |
_addForgotPwdEmail ($oShop) | |
_addNewsletterDbOptInMail ($oUser) | |
_clearMailer () | |
_setMailParams ($oShop=null) | |
_getShop ($iLangId=null) | |
_setSmtpAuthInfo ($sUserName=null, $sUserPassword=null) | |
_setSmtpDebug ($blDebug=null) | |
_setMailerPluginDir () | |
_makeOutputProcessing () | |
_sendMail () | |
Protected Attributes | |
$_sForgotPwdTemplate = "email_forgotpwd_html.tpl" | |
$_sForgotPwdTemplatePlain = "email_forgotpwd_plain.tpl" | |
$_sNewsletterOptInTemplate = "email_newsletteroptin_html.tpl" | |
$_sNewsletterOptInTemplatePlain = "email_newsletteroptin_plain.tpl" | |
$_sSuggestTemplate = "email_suggest_html.tpl" | |
$_sSuggestTemplatePlain = "email_suggest_plain.tpl" | |
$_sSenedNowTemplate = "email_sendednow_html.tpl" | |
$_sSenedNowTemplatePlain = "email_sendednow_plain.tpl" | |
$_sWishListTemplate = "email_wishlist_html.tpl" | |
$_sWishListTemplatePlain = "email_wishlist_plain.tpl" | |
$_sRegisterTemplate = "email_register_html.tpl" | |
$_sRegisterTemplatePlain = "email_register_plain.tpl" | |
$_sReminderMailTemplate = "email_owner_reminder_html.tpl" | |
$_sOrderUserTemplate = "email_order_cust_html.tpl" | |
$_sOrderUserPlainTemplate = "email_order_cust_plain.tpl" | |
$_sOrderOwnerTemplate = "email_order_owner_html.tpl" | |
$_sOrderOwnerPlainTemplate = "email_order_owner_plain.tpl" | |
$_sOrderUserSubjectTemplate = "email_order_cust_subj.tpl" | |
$_sOrderOwnerSubjectTemplate = "email_order_owner_subj.tpl" | |
$_sOwnerPricealarmTemplate = "email_pricealarm_owner.tpl" | |
$_aShops = array() | |
$_blInlineImgEmail = null | |
$_aRecipients = array() | |
$_aReplies = array() | |
$_aAttachments = array() |
Includes PHP mailer class. Mailing manager. Collects mailing configuration, other parameters, performs mailing functions (newsletters, ordering, registration emails, etc.).
Definition at line 13 of file oxemail.php.
oxEmail.__construct | ( | ) |
Class constructor.
Definition at line 202 of file oxemail.php.
oxEmail.__call | ( | $ | sMethod, | |
$ | aArgs | |||
) |
Only used for convenience in UNIT tests by doing so we avoid writing extended classes for testing protected or private methods
string | $sMethod Methods name | |
array | $aArgs Argument array |
oxSystemComponentException | Throws an exception if the called method does not exist or is not accessable in current class |
Definition at line 230 of file oxemail.php.
oxEmail._addForgotPwdEmail | ( | $ | oShop | ) | [protected] |
Does nothing, returns same object as passed to method. This method is called from oxemail.SendForgotPWDEMail() to do additional operation with shop object before sending email
Definition at line 1715 of file oxemail.php.
oxEmail._addNewsletterDbOptInMail | ( | $ | oUser | ) | [protected] |
Does nothing, returns same object as passed to method. This method is called from oxemail.SendNewsletterDBOptInMail() to do additional operation with user object before sending email
Definition at line 1729 of file oxemail.php.
oxEmail._addUserInfoOrderEMail | ( | $ | oOrder | ) | [protected] |
Does nothing, returns same object as passed to method. This method is called from oxemail.sendOrderEMailToUser() to do additional operation with order object before sending email
oxOrder | $oOrder Ordering object |
Definition at line 1687 of file oxemail.php.
oxEmail._addUserRegisterEmail | ( | $ | oUser | ) | [protected] |
Does nothing, returns same object as passed to method. This method is called from oxemail.SendRegisterEMail() to do additional operation with user object before sending email
Definition at line 1701 of file oxemail.php.
oxEmail._clearMailer | ( | ) | [protected] |
Clears mailer settings (AllRecipients, ReplyTos, Attachments, Errors)
Definition at line 1739 of file oxemail.php.
oxEmail._getNewsSubsLink | ( | $ | sId | ) | [protected] |
Returns newsletter subscription link
string | $sId user id |
Definition at line 781 of file oxemail.php.
oxEmail._getShop | ( | $ | iLangId = null |
) | [protected] |
Get active shop and set global params for it If is set language parameter, load shop in given language
int | $iLangId language id |
Definition at line 1777 of file oxemail.php.
oxEmail._getUseInlineImages | ( | ) | [protected] |
oxEmail._includeImages | ( | $ | sImageDir = null , |
|
$ | sImageDirNoSSL = null , |
|||
$ | sDynImageDir = null , |
|||
$ | sAbsImageDir = null , |
|||
$ | sAbsDynImageDir = null | |||
) | [protected] |
Checks for external images and embeds them to email message if possible
string | $sImageDir Images directory url | |
string | $sImageDirNoSSL Images directory url (no SSL) | |
string | $sDynImageDir Path to Dyn images | |
string | $sAbsImageDir Absolute path to images | |
string | $sAbsDynImageDir Absolute path to Dyn images |
Definition at line 1190 of file oxemail.php.
oxEmail._isValidSmtpHost | ( | $ | sSmtpHost | ) | [protected] |
Checks if smtp host is valid (tries to connect to it)
string | $sSmtpHost currently used smtp server host name |
Definition at line 381 of file oxemail.php.
oxEmail._makeOutputProcessing | ( | ) | [protected] |
Process email body and alt body throught oxoutput. Calls oxoutput.processEmail() on class instance.
Definition at line 1837 of file oxemail.php.
oxEmail._sendMail | ( | ) | [protected] |
oxEmail._sendMailErrorMsg | ( | ) | [protected] |
Try to send error message when original mailing by smtp and via mail() fails
Definition at line 1653 of file oxemail.php.
oxEmail._setMailerPluginDir | ( | ) | [protected] |
oxEmail._setMailParams | ( | $ | oShop = null |
) | [protected] |
oxEmail._setSmtpAuthInfo | ( | $ | sUserName = null , |
|
$ | sUserPassword = null | |||
) | [protected] |
Sets smtp authentification parameters.
string | $sUserName smtp user | |
oxShop | $sUserPassword smtp password |
Definition at line 1802 of file oxemail.php.
oxEmail._setSmtpDebug | ( | $ | blDebug = null |
) | [protected] |
Sets SMTP class debugging on or off
bool | $blDebug show debug info or not |
Definition at line 1816 of file oxemail.php.
oxEmail._setSmtpProtocol | ( | $ | sUrl | ) | [protected] |
Sets smtp parameters depending on the protocol used returns smtp url which should be used for fsockopen
string | $sUrl initial smtp |
Definition at line 325 of file oxemail.php.
oxEmail.addAttachment | ( | $ | sAttPath, | |
$ | sAttFile = '' , |
|||
$ | sEncoding = 'base64' , |
|||
$ | sType = 'application/octet-stream' | |||
) |
Adds an attachment to mail from a path on the filesystem
string | $sAttPath path to the attachment | |
string | $sAttFile attachment name | |
string | $sEncoding attachment encoding | |
string | $sType attachment type |
Definition at line 1568 of file oxemail.php.
oxEmail.addEmbeddedImage | ( | $ | sFullPath, | |
$ | sCid, | |||
$ | sAttFile = '' , |
|||
$ | sEncoding = 'base64' , |
|||
$ | sType = 'application/octet-stream' | |||
) |
Adds an embedded attachment (check phpmail documentation for more details)
string | $sFullPath Path to the attachment. | |
string | $sCid Content ID of the attachment. Use this to identify the Id for accessing the image in an HTML form. | |
string | $sAttFile Overrides the attachment name. | |
string | $sEncoding File encoding (see $Encoding). | |
string | $sType File extension (MIME) type. |
Definition at line 1594 of file oxemail.php.
oxEmail.clearAllRecipients | ( | ) |
Clears all recipients assigned in the TO, CC and BCC array. Returns void.
Definition at line 1372 of file oxemail.php.
oxEmail.clearAttachments | ( | ) |
oxEmail.clearReplyTos | ( | ) |
Clears all recipients assigned in the ReplyTo array. Returns void.
Definition at line 1418 of file oxemail.php.
oxEmail.getAltBody | ( | ) |
oxEmail.getAttachments | ( | ) |
oxEmail.getBody | ( | ) |
oxEmail.getCharSet | ( | ) |
oxEmail.getConfig | ( | ) |
oxEmail.getErrorInfo | ( | ) |
oxEmail.getFrom | ( | ) |
oxEmail.getFromName | ( | ) |
oxEmail.getMailer | ( | ) |
oxEmail.getRecipient | ( | ) |
Gets recipients array. Returns array of recipients f.e. array( array('mail1.com', 'user1Name'), array('mail2.com', 'user2Name') )
Definition at line 1361 of file oxemail.php.
oxEmail.getReplyTo | ( | ) |
Gets array of users for which reply is used.
Definition at line 1408 of file oxemail.php.
oxEmail.getSubject | ( | ) |
oxEmail.headerLine | ( | $ | sName, | |
$ | sValue | |||
) |
Inherited phpMailer function adding a header to email message. We override it to skip X-Mailer header.
string | $sName header name | |
string | $sValue header value |
Definition at line 1630 of file oxemail.php.
oxEmail.send | ( | ) |
Otputs email fields throught email output processor, includes images, and initiate email sending If fails to send mail via smtp, tryes to send via mail(). On failing to send, sends mail to shop administrator about failing mail sending
Definition at line 277 of file oxemail.php.
oxEmail.sendBackupMail | ( | $ | aAttFiles, | |
$ | sAttPath, | |||
$ | sEmailAddress, | |||
$ | sSubject, | |||
$ | sMessage, | |||
&$ | aStatus, | |||
&$ | aError | |||
) |
Sets mailer additional settings and sends backuped data to user. Returns true on success.
array | $aAttFiles Array of file names to attach | |
string | $sAttPath Path to files to attach | |
string | $sEmailAddress Email address | |
string | $sSubject Email subject | |
string | $sMessage Email body message | |
array | &$aStatus Pointer to mailing status array | |
array | &$aError Pointer to error status array |
Definition at line 970 of file oxemail.php.
oxEmail.sendContactMail | ( | $ | sEmailAddress = null , |
|
$ | sSubject = null , |
|||
$ | sMessage = null | |||
) |
Sets mailer additional settings and sends contact info mail to user. Returns true on success.
string | $sEmailAddress Email address | |
string | $sSubject Email subject | |
string | $sMessage Email message text |
Definition at line 705 of file oxemail.php.
oxEmail.sendEmail | ( | $ | sTo, | |
$ | sSubject, | |||
$ | sBody | |||
) |
Basic wrapper for email message sending with default parameters from the oxbaseshop. Returns true on success.
mixed | $sTo Recipient or an array of the recipients | |
string | $sSubject Mail subject | |
string | $sBody Mmail body |
Definition at line 1028 of file oxemail.php.
oxEmail.sendForgotPwdEmail | ( | $ | sEmailAddress, | |
$ | sSubject = null | |||
) |
Sets mailer additional settings and sends "forgot password" mail to user. Returns true on success.
string | $sEmailAddress user email address | |
string | $sSubject user defined subject [optional] |
Definition at line 634 of file oxemail.php.
oxEmail.sendNewsletterDbOptInMail | ( | $ | oUser, | |
$ | sSubject = null | |||
) |
Sets mailer additional settings and sends "NewsletterDBOptInMail" mail to user. Returns true on success.
oxUser | $oUser user object | |
string | $sSubject user defined subject [optional] |
Definition at line 733 of file oxemail.php.
oxEmail.sendNewsletterMail | ( | $ | oNewsLetter, | |
$ | oUser, | |||
$ | sSubject = null | |||
) |
Sets mailer additional settings and sends "newsletter" mail to user. Returns true on success.
oxNewsletter | $oNewsLetter newsletter object | |
oxUser | $oUser user object | |
string | $sSubject user defined subject [optional] |
Definition at line 801 of file oxemail.php.
oxEmail.sendOrderEmailToOwner | ( | $ | oOrder, | |
$ | sSubject = null | |||
) |
Sets mailer additional settings and sends ordering mail to shop owner. Returns true on success.
oxOrder | $oOrder Order object | |
string | $sSubject user defined subject [optional] |
Definition at line 491 of file oxemail.php.
oxEmail.sendOrderEmailToUser | ( | $ | oOrder, | |
$ | sSubject = null | |||
) |
Sets mailer additional settings and sends ordering mail to user. Returns true on success.
oxOrder | $oOrder Order object | |
string | $sSubject user defined subject [optional] |
Definition at line 411 of file oxemail.php.
oxEmail.sendPriceAlarmNotification | ( | $ | aParams, | |
$ | oAlarm, | |||
$ | sSubject = null | |||
) |
Sends a notification to the shop owner that pricealarm was subscribed. Returns true on success.
array | $aParams Parameters array | |
oxpricealarm | $oAlarm oxPriceAlarm object | |
string | $sSubject user defined subject [optional] |
Definition at line 1143 of file oxemail.php.
oxEmail.sendRegisterEmail | ( | $ | oUser, | |
$ | sSubject = null | |||
) |
Sets mailer additional settings and sends registration mail to user. Returns true on success.
oxUser | $oUser user object | |
string | $sSubject user defined subject [optional] |
Definition at line 586 of file oxemail.php.
oxEmail.sendSendedNowMail | ( | $ | oOrder, | |
$ | sSubject = null | |||
) |
Sets mailer additional settings and sends "SendedNowMail" mail to user. Returns true on success.
oxOrder | $oOrder order object | |
string | $sSubject user defined subject [optional] |
Definition at line 892 of file oxemail.php.
oxEmail.sendStockReminder | ( | $ | aBasketContents, | |
$ | sSubject = null | |||
) |
Sends reminder email to shop owner.
array | $aBasketContents array of objects to pass to template | |
string | $sSubject user defined subject [optional] |
Definition at line 1060 of file oxemail.php.
oxEmail.sendSuggestMail | ( | $ | oParams, | |
$ | oProduct | |||
) |
Sets mailer additional settings and sends "SuggestMail" mail to user. Returns true on success.
object | $oParams Mailing parameters object | |
object | $oProduct Product object |
Definition at line 837 of file oxemail.php.
oxEmail.sendWishlistMail | ( | $ | oParams | ) |
Sets mailer additional settings and sends "WishlistMail" mail to user. Returns true on success.
object | $oParams Mailing parameters object |
Definition at line 1102 of file oxemail.php.
oxEmail.setAltBody | ( | $ | sAltBody = null , |
|
$ | blClearSid = true | |||
) |
Sets text-only body of the message. If second parameter is set to true, performs searche for "sid", replaces sid by sid=x and adds shop id to string
string | $sAltBody mail subject | |
bool | $blClearSid clear sid in mail body (default value is true) |
Definition at line 1313 of file oxemail.php.
oxEmail.setBody | ( | $ | sBody = null , |
|
$ | blClearSid = true | |||
) |
Set mail body. If second parameter (default value is true) is set to true, performs searche for "sid", replaces sid by sid=x and adds shop id to string
string | $sBody mail body | |
bool | $blClearSid clear sid in mail body |
Definition at line 1285 of file oxemail.php.
oxEmail.setCharSet | ( | $ | sCharSet = null |
) |
Sets mail charset. If $sCharSet is not defined, sets charset from translation file.
string | $sCharSet email charset |
Definition at line 1474 of file oxemail.php.
oxEmail.setConfig | ( | $ | oConfig | ) |
oxConfig instance setter
oxConfig | $oConfig config object |
Definition at line 265 of file oxemail.php.
oxEmail.setFrom | ( | $ | sFromAdress, | |
$ | sFromName = null | |||
) |
Sets mail from address and name.
string | $sFromAdress email address | |
string | $sFromName user name |
Definition at line 1432 of file oxemail.php.
oxEmail.setHost | ( | $ | sHost = null |
) |
Sets stmp host.
string | $sHost smtp host |
Definition at line 1518 of file oxemail.php.
oxEmail.setMailer | ( | $ | sMailer = null |
) |
Sets mail mailer. Set to send mail via smtp, mail() or sendmail.
string | $sMailer email mailer |
Definition at line 1496 of file oxemail.php.
oxEmail.setMailWordWrap | ( | $ | iWordWrap = null |
) |
Sets word wrapping on the body of the message to a given number of characters
int | $iWordWrap word wrap |
Definition at line 1541 of file oxemail.php.
oxEmail.setRecipient | ( | $ | sAddress = null , |
|
$ | sName = null | |||
) |
Sets mail recipient to recipients array
string | $sAddress recipient email address | |
string | $sName recipient name |
Definition at line 1343 of file oxemail.php.
oxEmail.setReplyTo | ( | $ | sEmail = null , |
|
$ | sName = null | |||
) |
Sets user address and name to "reply to" array. On error (wrong email) default shop email is added as a reply address. Returns array of recipients f.e. array( array('mail1.com', 'user1Name'), array('mail2.com', 'user2Name') )
string | $sEmail email address | |
string | $sName user name |
Definition at line 1389 of file oxemail.php.
oxEmail.setSmtp | ( | $ | oShop = null |
) |
Sets SMTP mailer parameters, such as user name, password, location.
oxShop | $oShop Object, that keeps base shop info |
Definition at line 350 of file oxemail.php.
oxEmail.setSubject | ( | $ | sSubject = null |
) |
Sets mail subject
string | $sSubject mail subject |
Definition at line 1258 of file oxemail.php.
oxEmail.setUseInlineImages | ( | $ | blUseImages = null |
) |
Sets use inline images. If setted to true, images will be embeded into mail.
bool | $blUseImages embed or not images into mail |
Definition at line 1553 of file oxemail.php.
oxEmail.$_aAttachments = array() [protected] |
Definition at line 197 of file oxemail.php.
oxEmail.$_aRecipients = array() [protected] |
Definition at line 183 of file oxemail.php.
oxEmail.$_aReplies = array() [protected] |
Definition at line 190 of file oxemail.php.
oxEmail.$_aShops = array() [protected] |
Definition at line 169 of file oxemail.php.
oxEmail.$_blInlineImgEmail = null [protected] |
Definition at line 176 of file oxemail.php.
oxEmail.$_sForgotPwdTemplate = "email_forgotpwd_html.tpl" [protected] |
Definition at line 27 of file oxemail.php.
oxEmail.$_sForgotPwdTemplatePlain = "email_forgotpwd_plain.tpl" [protected] |
Definition at line 34 of file oxemail.php.
oxEmail.$_sNewsletterOptInTemplate = "email_newsletteroptin_html.tpl" [protected] |
Definition at line 41 of file oxemail.php.
oxEmail.$_sNewsletterOptInTemplatePlain = "email_newsletteroptin_plain.tpl" [protected] |
Definition at line 48 of file oxemail.php.
oxEmail.$_sOrderOwnerPlainTemplate = "email_order_owner_plain.tpl" [protected] |
Definition at line 139 of file oxemail.php.
oxEmail.$_sOrderOwnerSubjectTemplate = "email_order_owner_subj.tpl" [protected] |
Definition at line 155 of file oxemail.php.
oxEmail.$_sOrderOwnerTemplate = "email_order_owner_html.tpl" [protected] |
Definition at line 132 of file oxemail.php.
oxEmail.$_sOrderUserPlainTemplate = "email_order_cust_plain.tpl" [protected] |
Definition at line 125 of file oxemail.php.
oxEmail.$_sOrderUserSubjectTemplate = "email_order_cust_subj.tpl" [protected] |
Definition at line 148 of file oxemail.php.
oxEmail.$_sOrderUserTemplate = "email_order_cust_html.tpl" [protected] |
Definition at line 118 of file oxemail.php.
oxEmail.$_sOwnerPricealarmTemplate = "email_pricealarm_owner.tpl" [protected] |
Definition at line 162 of file oxemail.php.
oxEmail.$_sRegisterTemplate = "email_register_html.tpl" [protected] |
Definition at line 97 of file oxemail.php.
oxEmail.$_sRegisterTemplatePlain = "email_register_plain.tpl" [protected] |
Definition at line 104 of file oxemail.php.
oxEmail.$_sReminderMailTemplate = "email_owner_reminder_html.tpl" [protected] |
Definition at line 111 of file oxemail.php.
oxEmail.$_sSenedNowTemplate = "email_sendednow_html.tpl" [protected] |
Definition at line 69 of file oxemail.php.
oxEmail.$_sSenedNowTemplatePlain = "email_sendednow_plain.tpl" [protected] |
Definition at line 76 of file oxemail.php.
oxEmail.$_sSuggestTemplate = "email_suggest_html.tpl" [protected] |
Definition at line 55 of file oxemail.php.
oxEmail.$_sSuggestTemplatePlain = "email_suggest_plain.tpl" [protected] |
Definition at line 62 of file oxemail.php.
oxEmail.$_sWishListTemplate = "email_wishlist_html.tpl" [protected] |
Definition at line 83 of file oxemail.php.
oxEmail.$_sWishListTemplatePlain = "email_wishlist_plain.tpl" [protected] |
Definition at line 90 of file oxemail.php.
oxEmail.$SMTP_PORT = 25 |
Definition at line 20 of file oxemail.php.