OXID eShop CE
6.1.5
|
Public Member Functions | |
__construct () | |
__call ($method, $args) | |
getConfig () | |
setConfig ($config) | |
send () | |
setSmtp ($shop=null) | |
sendOrderEmailToUser ($order, $subject=null) | |
sendOrderEmailToOwner ($order, $subject=null) | |
sendRegisterConfirmEmail ($user, $subject=null) | |
sendRegisterEmail ($user, $subject=null) | |
sendForgotPwdEmail ($emailAddress, $subject=null) | |
sendContactMail ($emailAddress=null, $subject=null, $message=null) | |
sendNewsletterDbOptInMail ($user, $subject=null) | |
sendNewsletterMail ($newsLetter, $user, $subject=null) | |
sendSuggestMail ($params, $product) | |
sendInviteMail ($params) | |
sendSendedNowMail ($order, $subject=null) | |
sendDownloadLinksMail ($order, $subject=null) | |
sendBackupMail ($attFiles, $attPath, $emailAddress, $subject, $message, &$status, &$error) | |
sendEmail ($to, $subject, $body) | |
sendStockReminder ($basketContents, $subject=null) | |
sendWishlistMail ($params) | |
sendPriceAlarmNotification ($params, $alarm, $subject=null) | |
sendPricealarmToCustomer ($recipient, $alarm, $body=null, $returnMailBody=null) | |
setSubject ($subject=null) | |
getSubject () | |
setBody ($body=null, $clearSid=true) | |
getBody () | |
setAltBody ($altBody=null, $clearSid=true) | |
getAltBody () | |
setRecipient ($address=null, $name=null) | |
getRecipient () | |
clearAllRecipients () | |
setReplyTo ($email=null, $name=null) | |
getReplyTo () | |
clearReplyTos () | |
setFrom ($address, $name=null, $auto=true) | |
getFrom () | |
getFromName () | |
setCharSet ($charSet=null) | |
setMailer ($mailer=null) | |
getMailer () | |
setHost ($host=null) | |
getErrorInfo () | |
setMailWordWrap ($wordWrap=null) | |
setUseInlineImages ($useImages=null) | |
addAttachment ( $path, $name='', $encoding='base64', $type='application/octet-stream', $disposition='attachment') | |
addEmbeddedImage ( $path, $cid, $name='', $encoding='base64', $type='application/octet-stream', $disposition='inline') | |
getAttachments () | |
clearAttachments () | |
headerLine ($name, $value) | |
getCharset () | |
getShop () | |
setShop ($shop) | |
getViewConfig () | |
getView () | |
getCurrency () | |
setViewData ($key, $value) | |
getViewData () | |
getViewDataItem ($key) | |
setUser ($user) | |
getUser () | |
getOrderFileList ($orderId) | |
Public Attributes | |
$Version = '5.2.27' | |
$SMTP_PORT = 25 | |
$smtpPort = 25 | |
Protected Member Functions | |
_getSmarty () | |
_setSmtpProtocol ($url) | |
_isValidSmtpHost ($smtpHost) | |
onOrderEmailToOwnerSent ($user, $order) | |
_getNewsSubsLink ($id, $confirmCode=null) | |
_includeImages ($imageDir=null, $imageDirNoSSL=null, $dynImageDir=null, $absImageDir=null, $absDynImageDir=null) | |
_getUseInlineImages () | |
_sendMailErrorMsg () | |
_addUserInfoOrderEMail ($order) | |
_addUserRegisterEmail ($user) | |
_addForgotPwdEmail ($shop) | |
_addNewsletterDbOptInMail ($user) | |
_clearMailer () | |
_setMailParams ($shop=null) | |
_getShop ($langId=null, $shopId=null) | |
_setSmtpAuthInfo ($userName=null, $userPassword=null) | |
_setSmtpDebug ($debug=null) | |
_setMailerPluginDir () | |
_makeOutputProcessing () | |
_sendMail () | |
_processViewArray () | |
getUtilsObjectInstance () | |
Protected Attributes | |
$_sForgotPwdTemplate = "email/html/forgotpwd.tpl" | |
$_sForgotPwdTemplatePlain = "email/plain/forgotpwd.tpl" | |
$_sNewsletterOptInTemplate = "email/html/newsletteroptin.tpl" | |
$_sNewsletterOptInTemplatePlain = "email/plain/newsletteroptin.tpl" | |
$_sSuggestTemplate = "email/html/suggest.tpl" | |
$_sSuggestTemplatePlain = "email/plain/suggest.tpl" | |
$_sInviteTemplate = "email/html/invite.tpl" | |
$_sInviteTemplatePlain = "email/plain/invite.tpl" | |
$_sSenedNowTemplate = "email/html/ordershipped.tpl" | |
$_sSenedNowTemplatePlain = "email/plain/ordershipped.tpl" | |
$_sSendDownloadsTemplate = "email/html/senddownloadlinks.tpl" | |
$_sSendDownloadsTemplatePlain = "email/plain/senddownloadlinks.tpl" | |
$_sWishListTemplate = "email/html/wishlist.tpl" | |
$_sWishListTemplatePlain = "email/plain/wishlist.tpl" | |
$_sRegisterTemplate = "email/html/register.tpl" | |
$_sRegisterTemplatePlain = "email/plain/register.tpl" | |
$_sReminderMailTemplate = "email/html/owner_reminder.tpl" | |
$_sOrderUserTemplate = "email/html/order_cust.tpl" | |
$_sOrderUserPlainTemplate = "email/plain/order_cust.tpl" | |
$_sOrderOwnerTemplate = "email/html/order_owner.tpl" | |
$_sOrderOwnerPlainTemplate = "email/plain/order_owner.tpl" | |
$_sOrderUserSubjectTemplate = "email/html/order_cust_subj.tpl" | |
$_sOrderOwnerSubjectTemplate = "email/html/order_owner_subj.tpl" | |
$_sOwnerPricealarmTemplate = "email/html/pricealarm_owner.tpl" | |
$_sPricealamrCustomerTemplate = "email_pricealarm_customer.tpl" | |
$_aShops = [] | |
$_blInlineImgEmail = null | |
$_aRecipients = [] | |
$_aReplies = [] | |
$_aAttachments = [] | |
$_oSmarty = null | |
$_aViewData = [] | |
$_oShop = null | |
$_sCharSet = null | |
$_oConfig = null | |
Private Member Functions | |
_clearSidFromBody ($altBody) | |
isDebugModeEnabled () | |
getUserIdByUserName ($userName, $shopId) | |
shouldProductReviewLinksBeIncluded () | |
Mailing manager. Collects mailing configuration, other parameters, performs mailing functions (newsletters, ordering, registration emails, etc.).
OxidEsales\EshopCommunity\Core\Email::__construct | ( | ) |
Class constructor.
OxidEsales\EshopCommunity\Core\Email::__call | ( | $method, | |
$args | |||
) |
Only used for convenience in UNIT tests by doing so we avoid writing extended classes for testing protected or private methods
string | $method | Methods name |
array | $args | Argument array |
oxSystemComponentException | Throws an exception if the called method does not exist or is not accessible in current class |
|
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
\OxidEsales\Eshop\Application\Model\Shop | $shop | Shop object |
|
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
\OxidEsales\Eshop\Application\Model\User | $user | User object |
|
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
\OxidEsales\Eshop\Application\Model\Order | $order | Ordering object |
|
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
\OxidEsales\Eshop\Application\Model\User | $user | User object |
|
protected |
Clears mailer settings (AllRecipients, ReplyTos, Attachments, Errors)
|
private |
Performs search for "sid", removes it and adds shop id to string.
string | $altBody | Body. |
|
protected |
Returns newsletter subscription link
string | $id | user id |
string | $confirmCode | confirmation code |
|
protected |
Get active shop and set global params for it If is set language parameter, load shop in given language
int | $langId | language id |
int | $shopId | shop id |
|
protected |
Smarty instance getter, assigns this oxEmail instance to "oEmailView" variable
|
protected |
Gets use inline images.
|
protected |
Checks for external images and embeds them to email message if possible
string | $imageDir | Images directory url |
string | $imageDirNoSSL | Images directory url (no SSL) |
string | $dynImageDir | Path to Dyn images |
string | $absImageDir | Absolute path to images |
string | $absDynImageDir | Absolute path to Dyn images |
|
protected |
Checks if smtp host is valid (tries to connect to it)
string | $smtpHost | currently used smtp server host name |
|
protected |
Process email body and alt body thought oxOutput. Calls \OxidEsales\Eshop\Core\Output::processEmail() on class instance.
|
protected |
Process view data array through oxOutput processor
|
protected |
Sends email via phpmailer.
|
protected |
Try to send error message when original mailing by smtp and via mail() fails
|
protected |
Sets path to PHPMailer plugins
|
protected |
Set mail From, FromName, SMTP values
\OxidEsales\Eshop\Application\Model\Shop | $shop | Shop object |
|
protected |
Sets smtp authentification parameters.
string | $userName | smtp user |
\OxidEsales\Eshop\Application\Model\Shop | $userPassword | smtp password |
|
protected |
Sets SMTP class debugging on or off
bool | $debug | show debug info or not |
|
protected |
Sets smtp parameters depending on the protocol used returns smtp url which should be used for fsockopen
string | $url | initial smtp |
OxidEsales\EshopCommunity\Core\Email::addAttachment | ( | $path, | |
$name = '' , |
|||
$encoding = 'base64' , |
|||
$type = 'application/octet-stream' , |
|||
$disposition = 'attachment' |
|||
) |
string | $path | |
string | $name | |
string | $encoding | |
string | $type | |
string | $disposition |
OxidEsales\EshopCommunity\Core\Email::addEmbeddedImage | ( | $path, | |
$cid, | |||
$name = '' , |
|||
$encoding = 'base64' , |
|||
$type = 'application/octet-stream' , |
|||
$disposition = 'inline' |
|||
) |
string | $path | |
string | $cid | |
string | $name | |
string | $encoding | |
string | $type | |
string | $disposition |
OxidEsales\EshopCommunity\Core\Email::clearAllRecipients | ( | ) |
Clears all recipients assigned in the TO, CC and BCC array.
OxidEsales\EshopCommunity\Core\Email::clearAttachments | ( | ) |
Clears all attachments from mail.
OxidEsales\EshopCommunity\Core\Email::clearReplyTos | ( | ) |
Clears all recipients assigned in the ReplyTo array. Returns void.
OxidEsales\EshopCommunity\Core\Email::getAltBody | ( | ) |
Gets mail text-only body
OxidEsales\EshopCommunity\Core\Email::getAttachments | ( | ) |
Gets mail attachment.
OxidEsales\EshopCommunity\Core\Email::getBody | ( | ) |
Gets mail body
OxidEsales\EshopCommunity\Core\Email::getCharset | ( | ) |
Get mail charset
OxidEsales\EshopCommunity\Core\Email::getConfig | ( | ) |
oxConfig instance getter
OxidEsales\EshopCommunity\Core\Email::getCurrency | ( | ) |
Get active shop currency
OxidEsales\EshopCommunity\Core\Email::getErrorInfo | ( | ) |
Gets mailing error info.
OxidEsales\EshopCommunity\Core\Email::getFrom | ( | ) |
Gets mail "from address" field.
OxidEsales\EshopCommunity\Core\Email::getFromName | ( | ) |
Gets mail "from name" field.
OxidEsales\EshopCommunity\Core\Email::getMailer | ( | ) |
Gets mail mailer.
OxidEsales\EshopCommunity\Core\Email::getOrderFileList | ( | $orderId | ) |
Get order files
string | $orderId | order id |
OxidEsales\EshopCommunity\Core\Email::getRecipient | ( | ) |
OxidEsales\EshopCommunity\Core\Email::getReplyTo | ( | ) |
Gets array of users for which reply is used.
OxidEsales\EshopCommunity\Core\Email::getShop | ( | ) |
Get shop object
OxidEsales\EshopCommunity\Core\Email::getSubject | ( | ) |
Gets mail subject
OxidEsales\EshopCommunity\Core\Email::getUser | ( | ) |
Get user
|
private |
string | $userName | |
int | $shopId |
|
protected |
OxidEsales\EshopCommunity\Core\Email::getView | ( | ) |
Get active view
OxidEsales\EshopCommunity\Core\Email::getViewConfig | ( | ) |
Gets viewConfig object
OxidEsales\EshopCommunity\Core\Email::getViewData | ( | ) |
Get view data
OxidEsales\EshopCommunity\Core\Email::getViewDataItem | ( | $key | ) |
Get view data item
string | $key | view data array key |
OxidEsales\EshopCommunity\Core\Email::headerLine | ( | $name, | |
$value | |||
) |
Inherited phpMailer function adding a header to email message. We override it to skip X-Mailer header.
string | $name | header name |
string | $value | header value |
|
private |
Return true if debug mode is enabled.
|
protected |
Method is called when order email is sent to owner.
\OxidEsales\Eshop\Application\Model\User | $user | |
\OxidEsales\Eshop\Application\Model\Order | $order |
OxidEsales\EshopCommunity\Core\Email::send | ( | ) |
Outputs email fields thought email output processor, includes images, and initiate email sending If fails to send mail via SMTP, tries to send via mail(). On failing to send, sends mail to shop administrator about failing mail sending
OxidEsales\EshopCommunity\Core\Email::sendBackupMail | ( | $attFiles, | |
$attPath, | |||
$emailAddress, | |||
$subject, | |||
$message, | |||
& | $status, | ||
& | $error | ||
) |
Sets mailer additional settings and sends backup data to user. Returns true on success.
array | $attFiles | Array of file names to attach |
string | $attPath | Path to files to attach |
string | $emailAddress | Email address |
string | $subject | Email subject |
string | $message | Email body message |
array | $status | Pointer to mailing status array |
array | $error | Pointer to error status array |
OxidEsales\EshopCommunity\Core\Email::sendContactMail | ( | $emailAddress = null , |
|
$subject = null , |
|||
$message = null |
|||
) |
OxidEsales\EshopCommunity\Core\Email::sendDownloadLinksMail | ( | $order, | |
$subject = null |
|||
) |
Sets mailer additional settings and sends "SendDownloadLinks" mail to user. Returns true on success.
\OxidEsales\Eshop\Application\Model\Order | $order | order object |
string | $subject | user defined subject [optional] |
OxidEsales\EshopCommunity\Core\Email::sendEmail | ( | $to, | |
$subject, | |||
$body | |||
) |
Basic wrapper for email message sending with default parameters from the oxBaseShop. Returns true on success.
mixed | $to | Recipient or an array of the recipients |
string | $subject | Mail subject |
string | $body | Mail body |
OxidEsales\EshopCommunity\Core\Email::sendForgotPwdEmail | ( | $emailAddress, | |
$subject = null |
|||
) |
Sets mailer additional settings and sends "forgot password" mail to user. Returns true on success.
string | $emailAddress | user email address |
string | $subject | user defined subject [optional] |
OxidEsales\EshopCommunity\Core\Email::sendInviteMail | ( | $params | ) |
Sets mailer additional settings and sends "InviteMail" mail to user. Returns true on success.
object | $params | Mailing parameters object |
OxidEsales\EshopCommunity\Core\Email::sendNewsletterDbOptInMail | ( | $user, | |
$subject = null |
|||
) |
Sets mailer additional settings and sends "NewsletterDBOptInMail" mail to user. Returns true on success.
\OxidEsales\Eshop\Application\Model\User | $user | user object |
string | $subject | user defined subject [optional] |
OxidEsales\EshopCommunity\Core\Email::sendNewsletterMail | ( | $newsLetter, | |
$user, | |||
$subject = null |
|||
) |
Sets mailer additional settings and sends "newsletter" mail to user. Returns true on success.
\OxidEsales\Eshop\Application\Model\Newsletter | $newsLetter | newsletter object |
\OxidEsales\Eshop\Application\Model\User | $user | user object |
string | $subject | user defined subject [optional] |
OxidEsales\EshopCommunity\Core\Email::sendOrderEmailToOwner | ( | $order, | |
$subject = null |
|||
) |
Sets mailer additional settings and sends ordering mail to shop owner. Returns true on success.
\OxidEsales\Eshop\Application\Model\Order | $order | Order object |
string | $subject | user defined subject [optional] |
OxidEsales\EshopCommunity\Core\Email::sendOrderEmailToUser | ( | $order, | |
$subject = null |
|||
) |
Sets mailer additional settings and sends ordering mail to user. Returns true on success.
\OxidEsales\Eshop\Application\Model\Order | $order | Order object |
string | $subject | user defined subject [optional] |
OxidEsales\EshopCommunity\Core\Email::sendPriceAlarmNotification | ( | $params, | |
$alarm, | |||
$subject = null |
|||
) |
Sends a notification to the shop owner that price alarm was subscribed. Returns true on success.
array | $params | Parameters array |
\OxidEsales\Eshop\Application\Model\PriceAlarm | $alarm | oxPriceAlarm object |
string | $subject | user defined subject [optional] |
OxidEsales\EshopCommunity\Core\Email::sendPricealarmToCustomer | ( | $recipient, | |
$alarm, | |||
$body = null , |
|||
$returnMailBody = null |
|||
) |
Sends price alarm to customer. Returns true on success.
string | $recipient | |
\OxidEsales\Eshop\Application\Model\PriceAlarm | $alarm | oxPriceAlarm object |
string | $body | optional mail body |
bool | $returnMailBody | returns mail body instead of sending |
OxidEsales\EshopCommunity\Core\Email::sendRegisterConfirmEmail | ( | $user, | |
$subject = null |
|||
) |
Sets mailer additional settings and sends registration mail to user. Returns true on success.
\OxidEsales\Eshop\Application\Model\User | $user | user object |
string | $subject | user defined subject [optional] |
OxidEsales\EshopCommunity\Core\Email::sendRegisterEmail | ( | $user, | |
$subject = null |
|||
) |
Sets mailer additional settings and sends registration mail to user. Returns true on success.
\OxidEsales\Eshop\Application\Model\User | $user | user object |
string | $subject | user defined subject [optional] |
OxidEsales\EshopCommunity\Core\Email::sendSendedNowMail | ( | $order, | |
$subject = null |
|||
) |
Sets mailer additional settings and sends "SendedNowMail" mail to user. Returns true on success.
\OxidEsales\Eshop\Application\Model\Order | $order | order object |
string | $subject | user defined subject [optional] |
OxidEsales\EshopCommunity\Core\Email::sendStockReminder | ( | $basketContents, | |
$subject = null |
|||
) |
Sends reminder email to shop owner.
array | $basketContents | array of objects to pass to template |
string | $subject | user defined subject [optional] |
OxidEsales\EshopCommunity\Core\Email::sendSuggestMail | ( | $params, | |
$product | |||
) |
Sets mailer additional settings and sends "SuggestMail" mail to user. Returns true on success.
object | $params | Mailing parameters object |
object | $product | Product object |
OxidEsales\EshopCommunity\Core\Email::sendWishlistMail | ( | $params | ) |
Sets mailer additional settings and sends "WishlistMail" mail to user. Returns true on success.
\OxidEsales\Eshop\Application\Model\User | object | $params | Mailing parameters object |
OxidEsales\EshopCommunity\Core\Email::setAltBody | ( | $altBody = null , |
|
$clearSid = true |
|||
) |
Sets text-only body of the message. If second parameter is set to true, performs search for "sid", removes it and adds shop id to string.
string | $altBody | mail subject |
bool | $clearSid | clear sid in mail body (default value is true) |
OxidEsales\EshopCommunity\Core\Email::setBody | ( | $body = null , |
|
$clearSid = true |
|||
) |
Set mail body. If second parameter (default value is true) is set to true, performs search for "sid", removes it and adds shop id to string.
string | $body | mail body |
bool | $clearSid | clear sid in mail body |
OxidEsales\EshopCommunity\Core\Email::setCharSet | ( | $charSet = null | ) |
Sets mail charset. If $charSet is not defined, sets charset from translation file.
string | $charSet | email charset |
OxidEsales\EshopCommunity\Core\Email::setConfig | ( | $config | ) |
oxConfig instance setter
\OxidEsales\Eshop\Core\Config | $config | config object |
OxidEsales\EshopCommunity\Core\Email::setFrom | ( | $address, | |
$name = null , |
|||
$auto = true |
|||
) |
Preventing possible email spam over php mail() exploit (http://www.securephpwiki.com/index.php/Email_Injection)
string | $address | |
null | $name | |
bool | $auto |
OxidEsales\EshopCommunity\Core\Email::setHost | ( | $host = null | ) |
Sets smtp host.
string | $host | smtp host |
OxidEsales\EshopCommunity\Core\Email::setMailer | ( | $mailer = null | ) |
Sets mail mailer. Set to send mail via smtp, mail() or sendmail.
string | $mailer | email mailer |
OxidEsales\EshopCommunity\Core\Email::setMailWordWrap | ( | $wordWrap = null | ) |
Sets word wrapping on the body of the message to a given number of characters
int | $wordWrap | word wrap |
OxidEsales\EshopCommunity\Core\Email::setRecipient | ( | $address = null , |
|
$name = null |
|||
) |
Sets mail recipient to recipients array
string | $address | recipient email address |
string | $name | recipient name |
OxidEsales\EshopCommunity\Core\Email::setReplyTo | ( | $email = null , |
|
$name = 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', 'user1Name'), array(' @mai l1.co mmail2', 'user2Name') ) @mai l2.co m
string | email address | |
string | $name | user name |
OxidEsales\EshopCommunity\Core\Email::setShop | ( | $shop | ) |
Set shop object
\OxidEsales\Eshop\Application\Model\Shop | $shop | shop object |
OxidEsales\EshopCommunity\Core\Email::setSmtp | ( | $shop = null | ) |
Sets SMTP mailer parameters, such as user name, password, location.
\OxidEsales\Eshop\Application\Model\Shop | $shop | Object, that keeps base shop info |
OxidEsales\EshopCommunity\Core\Email::setSubject | ( | $subject = null | ) |
Sets mail subject
string | $subject | mail subject |
OxidEsales\EshopCommunity\Core\Email::setUseInlineImages | ( | $useImages = null | ) |
Sets use inline images. If true, images will be embedded into mail.
bool | $useImages | embed or not images into mail |
OxidEsales\EshopCommunity\Core\Email::setUser | ( | $user | ) |
Set user to view data
\OxidEsales\Eshop\Application\Model\User | $user | user object |
OxidEsales\EshopCommunity\Core\Email::setViewData | ( | $key, | |
$value | |||
) |
Set view data to email view.
string | $key | key value |
mixed | $value | item value |
|
private |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
OxidEsales\EshopCommunity\Core\Email::$SMTP_PORT = 25 |
OxidEsales\EshopCommunity\Core\Email::$smtpPort = 25 |
OxidEsales\EshopCommunity\Core\Email::$Version = '5.2.27' |