<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.x2crm.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tony+Zavala</id>
		<title>X2Engine - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.x2crm.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tony+Zavala"/>
		<link rel="alternate" type="text/html" href="http://wiki.x2crm.com/wiki/Special:Contributions/Tony_Zavala"/>
		<updated>2026-04-04T07:11:24Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.28.0</generator>

	<entry>
		<id>http://wiki.x2crm.com/index.php?title=Email_Configuration&amp;diff=1856</id>
		<title>Email Configuration</title>
		<link rel="alternate" type="text/html" href="http://wiki.x2crm.com/index.php?title=Email_Configuration&amp;diff=1856"/>
				<updated>2014-07-17T23:14:00Z</updated>
		
		<summary type="html">&lt;p&gt;Tony Zavala: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Support]]&lt;br /&gt;
This article covers configuring X2Engine for sending (and, in special cases, receiving) email.&lt;br /&gt;
&lt;br /&gt;
= Introduction =&lt;br /&gt;
X2Engine provides the means to send email, natively, within the web application. Furthermore, with Professional Edition, the local MTA on the web server (if any) can be configured to allow X2Engine to receive emails and automatically associate them with the addressee's contact record.&lt;br /&gt;
&lt;br /&gt;
= &amp;lt;span class=&amp;quot;noglossary&amp;quot;&amp;gt;Configuring SMTP Accounts&amp;lt;/span&amp;gt; =&lt;br /&gt;
This section describes the current, recommended method of sending email in X2Engine. It makes use of a credentials storage system X2Engine features, which encrypts passwords and other authentication data at the database storage level. It is currently only used for storing email account passwords, but may in the foreseeable future be extended to store other types of passwords. To access the credentials manager, click &amp;quot;Manage Apps&amp;quot; under the user menu.&lt;br /&gt;
&lt;br /&gt;
== Creating Credentials Records ==&lt;br /&gt;
[[File:New-Email-Account.png|200px|thumb|right|The create page for a generic email account]]&lt;br /&gt;
To create a new email account, first select a type in the dropdown menu next to the '''Add New''' button. Then, click '''Add New'''. The easiest type of email account to add is Google Mail (i.e. GMail or email accounts offered via Google Apps for businesses). For such email accounts, SMTP server data such as the host name, port, and security type are already set, and all you have to enter is your username, password, and sender name. For all other types of email, first contact your email hosting provider or peruse their documentation on configuring email client programs (i.e. Outlook / Thunderbird) for use with their email service. The essential information that you need:&lt;br /&gt;
* '''Server''': host name, i.e. smtp.email.com&lt;br /&gt;
* '''Port''': a 2-3 digit number, i.e. 25 for unsecured SMTP, or 465 (legacy) or 587 for secure SMTP.&lt;br /&gt;
* '''Security Type''': TLS/SSL. In most cases these are interchangeable.&lt;br /&gt;
* '''User name'''/'''Password''': If the SMTP server does not use authentication, leave these blank. Otherwise, set them according to the username/password used for logging in to the email&lt;br /&gt;
&lt;br /&gt;
== Creating System-Owned Credentials ==&lt;br /&gt;
One may wish to have all users use a specific email account/address for email blasting, or set a sender account for system notifications, or responses to service case submitters (etc). One can do so by creating publicly-usable email accounts. Such accounts will be usable by all users, but may only be viewed or edited by administrators, and thus are ideal for such purposes as they aren't necessarily attached to / identified with any given user.&lt;br /&gt;
&lt;br /&gt;
To designate an account as system-owned, set the '''Owner''' to be &amp;quot;System&amp;quot; when creating it.&lt;br /&gt;
&lt;br /&gt;
== Creating Non-Private Credentials ==&lt;br /&gt;
Non-administrators also have the ability to create credentials that can be used by administrators, in the rare case where it may be desirable for the owner to send mail on their behalf. To do so (allowing administrators to masquerade as the other user when sending email), that user must consent to allow their email account to be used by other people, by un-checking the '''Private''' checkbox. Note, however, that this will not allow administrators to view or edit the credentials, only to use them as a delivery method option when sending email.&lt;br /&gt;
&lt;br /&gt;
== Setting Personal Default Credentials ==&lt;br /&gt;
[[File:1-my-default.png|300px|thumb|right|Setting one's own personal default credentials]]&lt;br /&gt;
It is usually desirable to have a preferred email account for use in X2Engine, while at the same time having the option to send email using the system-wide (legacy) method, or via some other email account set up through the credentials manager.&lt;br /&gt;
&lt;br /&gt;
Next to each credentials record, there will be a &amp;quot;pill&amp;quot; with a checkbox in it that says &amp;quot;Set as my default&amp;quot;, or &amp;quot;Set as default&amp;quot; (when system-owned and being viewed by an administrative user). When the box is checked, an &amp;quot;apply&amp;quot; button will appear to enact the change. After clicking &amp;quot;apply&amp;quot; a green pill label appears on the record to denote that it has been selected as default. What this means is that whenever one opens the inline email widget (i.e. on a contact view, by clicking the email button), the &amp;quot;send as&amp;quot; field will be set to the selected account by default. This way it still allow switching email accounts on-the-fly, but removes an extra step that would otherwise be necessary to remember whenever sending an email.&lt;br /&gt;
&lt;br /&gt;
== Setting System Default Credentials ==&lt;br /&gt;
[[File:System-Default.png|450px|thumb|right|Setting default credentials for the system and/or oneself]]&lt;br /&gt;
All users have the ability to set system-owned credentials as their personal defaults. However, administrative users can also designate the credentials for system use purposes, i.e. bulk email and system notifications. For each credentials record owned by the system, when being viewed as the administrator, the pill will say &amp;quot;set as default&amp;quot; instead. When the box is checked, it will display a dropdown menu of system roles for which the account isn't already selected to use by default. After selecting the appropriate role to apply it as default for, and clicking &amp;quot;apply&amp;quot; as one would for setting personal defaults, it will be set as the default email account to use for that purpose.&lt;br /&gt;
&lt;br /&gt;
Note, also, setting defaults for system roles in the credentials manager is just another way of changing settings in &amp;quot;Email Server Configuration&amp;quot; (accessed from within the Admin panel), and vice versa. These settings are actually synchronized. Some definitions of system uses:&lt;br /&gt;
&lt;br /&gt;
;Bulk Email Account&lt;br /&gt;
: Will be selected by default when users create a new campaign (overrides the users' personal default)&lt;br /&gt;
;Service Case Email Account&lt;br /&gt;
: Used when sending responses to service case submitters.&lt;br /&gt;
;System Response Emailer&lt;br /&gt;
: Used when sending responses to web leads, and is selected by default in X2Flow's send-an-email actions (but can be changed).&lt;br /&gt;
;System Notification Emailer&lt;br /&gt;
: Used for miscellaneous notification tasks, most notably, sending &amp;quot;broadcast event&amp;quot; emails to targeted users when users broadcast an event, select users to broadcast it to, and enable the option to notify users by email.&lt;br /&gt;
&lt;br /&gt;
= Using The Legacy (system-wide) Email Delivery Methods =&lt;br /&gt;
Apart from using separate, third-party SMTP accounts for each user (and system purpose), there is a way to use a singular email delivery method for all emails sent via X2Engine. However, this method is not recommended, unless your web server also serves as your mail server. It is very much considered a legacy feature.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are four options for methods of sending email, which can be found in the '''Outbound Email Server''' section in '''Email Settings''' under the '''Email Configuration''' section in the '''Admin''' page. These methods are:&lt;br /&gt;
&lt;br /&gt;
# PHP Mail&lt;br /&gt;
# Sendmail&lt;br /&gt;
# QMail&lt;br /&gt;
# SMTP&lt;br /&gt;
&lt;br /&gt;
If any of these aren't available, they won't be listed in the '''Method''' menu.&lt;br /&gt;
&lt;br /&gt;
PHP Mail, Sendmail and QMail each, while independent of any offsite, third-party service, require that an MTA be available on the web server. The main difference is that PHP Mail uses whichever MTA that PHP itself is configured to use, whereas the Sendmail and QMail methods are specific to the Exim4/Postfix and QMail MTA's (respectively).&lt;br /&gt;
&lt;br /&gt;
For all instances of X2Engine Professional Edition cloud/ondemand, the methods available for sending mail include all of these except QMail.&lt;br /&gt;
&lt;br /&gt;
== Circumventing Spam Filters ==&lt;br /&gt;
While the non-SMTP methods for sending email within X2Engine may work immediately, a common problem encountered with them is that email goes into spam folders on the receiving end, or is not being received at all. ''This is especially likely to happen when the email addresses specified by users in their profiles'' (which get used as the sender address in the headers of mail sent by X2Engine) ''do not belong to the same domain name as the server hosting X2Engine.'' So, for example, it would be problematic if a user uses an email address in their X2Engine profile that ends in gmail.com, and the X2Engine system is hosted on example123.com&lt;br /&gt;
&lt;br /&gt;
This is '''not''' a fault in X2Engine (or [http://phpmailer.worxware.com/ PHPMailer], which X2Engine uses for mail delivery). Rather, it is endemic to all web applications (i.e. Wordpress, Drupal, etc.) due to how sender address spoofing (telling the recipient that the email comes from somewhere else) is a common behavior among spammers. Furthermore, the general proliferation of email spam through various means (but especially PHP scripts running on web servers) has resulted in greatly elevated standards in the spam-detection mechanisms and heuristics of most email servers. This generally poses an entry barrier to getting around spam filters. It is thus recommended that, before sending emails using these legacy methods, measures are taken to ensure that mail sent will have the best chance of avoiding spam filters.&lt;br /&gt;
&lt;br /&gt;
=== Work-around 1: Aliasing ===&lt;br /&gt;
This works by first creating mail forwarding aliases on the server, i.e. through a Virtualmin or CPanel control interface, or manually, by editing the MTA's virtual user aliases table (see their respective documentation for more information). Next, instruct all users to use these email addresses as their contact address in their X2Engine profile, so that when contacts reply, the response emails will be forwarded to the desired addresses (or even a list of addresses) specified by each alias.&lt;br /&gt;
&lt;br /&gt;
=== Work-around 2: Migration ===&lt;br /&gt;
This, of course, is the most straightforward solution: to use the hosting provider's email service. However, it requires switching from one's existing email service/addresses to service and addresses provided by the hosting provider, and it is also extra effort.&lt;br /&gt;
&lt;br /&gt;
=== Work-around 3: Third-party Service ===&lt;br /&gt;
''Note, using this method is '''not''' recommended; see &amp;lt;span class=&amp;quot;noglossary&amp;quot;&amp;gt;[[#Configuring SMTP Accounts|Configuring SMTP Accounts]]&amp;lt;/span&amp;gt; for the preferred method of using SMTP for email delivery.''&lt;br /&gt;
&lt;br /&gt;
Using this method, the entire organization that uses X2Engine sends email using a single email account managed by a third-party service that supports SMTP. Thus, sending the email and digital signing are handled by the third-party service, and getting caught in spam filters generally tends to be a smaller problem.&lt;br /&gt;
&lt;br /&gt;
In most cases, this method will work. How it works is that the reply-to address in the email will be set to the email address of user who is sending the mail through X2Engine, while the actual mail system user is used to authenticate with the mail server. In such cases, the address of the mail user might still show up in one of the headers of the resulting email. However, '''this is known to not work with many email providers, most notably GMail''', which (for security and anti-spam purposes) does not permit sending emails if the sender address differs from the address associated with the Google account that was used to authenticate. If this is the case, it is recommended to use separate SMTP accounts via the credentials manager.&lt;br /&gt;
&lt;br /&gt;
=== Using &amp;lt;span class=&amp;quot;noglossary&amp;quot;&amp;gt;DKIM&amp;lt;/span&amp;gt; ===&lt;br /&gt;
(see [[wikipedia:DomainKeys_Identified_Mail|main article]] on Wikipedia)&lt;br /&gt;
&lt;br /&gt;
This method, which requires server-end configuration, is a very secure and reliable method of distinguishing email as being of legitimate and trustworthy origin. '''Almost every''' reputable email service is configured to use a mail signing agent to add a special signature sent from such addresses, in addition to checking signatures of incoming emails. Emails that are digitally signed are far more likely to be recognized by mail servers worldwide as being from a reputable source, and thus less likely to go be caught in spam filters.&lt;br /&gt;
&lt;br /&gt;
However, it still requires that the sender's email address be of the same domain as the email server. That is because the sender address cannot be &amp;quot;spoofed&amp;quot;, because DKIM was designed to prevent this sort of activity (which is common among spammers). Furthermore, if outgoing email is signed for domains not corresponding to the point of origin, it may actually make matters worse; many reputable mail services (including GMail) themselves use DKIM to avoid their domain name being abused by address spoofing. Thus, if a DKIM signature header is added to the email, and the signature does not match the DKIM record of the sender's domain, it will be considered a forgery attempt and blocked/filtered by most email servers.&amp;lt;ref&amp;gt;DKIM uses the RSA public/private key cryptographic technique to ensure that signatures are secure and cannot be forged. Thus, there is no legitimate way of circumventing this issue.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting &amp;lt;span class=&amp;quot;noglossary&amp;quot;&amp;gt;SMTP&amp;lt;/span&amp;gt; =&lt;br /&gt;
If, when attempting to send an email, you see an error message &amp;quot;SMTP Error: Could not connect to SMTP host&amp;quot; (from an exception thrown in PHPMailer), this indicates exactly what it says; it was unable to connect. There are a wide variety of reasons why an SMTP connection should fail, but they almost always fall into one of the following two categories:&lt;br /&gt;
# Configuration of the connection and authentication&lt;br /&gt;
# Local network environment&lt;br /&gt;
It is recommended to check them in that order. First, to test configuration, check:&lt;br /&gt;
# The host name is correct&lt;br /&gt;
# The SMTP port number is correct&lt;br /&gt;
# The option to use TLS is enabled, if required by the email service provider&lt;br /&gt;
# The username and password are correct and exactly as specified by the service provider (i.e. if the SMTP username is whole email address, it should be entered as the whole email address).&lt;br /&gt;
Testing the network configuration is more involved and will require logging into the server that hosts X2Engine via SSH or otherwise. One should first acquire the IP address of the SMTP host, via the command &amp;lt;tt&amp;gt;ping [smtp host]&amp;lt;/tt&amp;gt; in a DOS or Unix shell, from any machine that is known to be able to access the mail server. You must then verify, locally on the X2Engine hosting server, that:&lt;br /&gt;
# The SMTP host can be reached, i.e. there exists no valid network route and/or NAT rule allowing access to it, from the server on which X2Engine is hosted. &lt;br /&gt;
# The SMTP hostname can be resolved (DNS is available). Try &amp;lt;tt&amp;gt;ping&amp;lt;/tt&amp;gt; again, on the server hosting X2Engine itself.&lt;br /&gt;
# The port number is not being blocked by the ISP for outbound connections on the port. &lt;br /&gt;
If the first two requirements are satisfied and SMTP connections still fail, this is most likely the cause of the problem. One can also test this via port scanning or [http://www.port25.com/how-to-check-an-smtp-connection-with-a-manual-telnet-session-2/ with telnet].&lt;br /&gt;
&lt;br /&gt;
= Configuring the &amp;quot;Email Dropbox&amp;quot; For Receiving Emails =&lt;br /&gt;
This feature, available in X2Engine Professional Edition, provides the means to automatically create contacts and email-type action records by capturing emails from external email software, i.e. Outlook and GMail.&lt;br /&gt;
&lt;br /&gt;
'''Note, if you are a customer of X2Engine Professional Cloud/On Demand:''' you do not need to set up the necessary prerequisites for this feature; that has been done for you. The feature should already be ready to use, and the alias will be &amp;lt;tt&amp;gt;dropbox@[yoursubdomain].x2vps.com&amp;lt;/tt&amp;gt;. You will only need to configure the Email Dropbox if you are using Download/On Premise.&lt;br /&gt;
&lt;br /&gt;
Setting it up requires a Linux/Unix server environment, a MTA, and knowledge of how to set up email aliases. There are two methods of integration: direct, and via API.&lt;br /&gt;
&lt;br /&gt;
== Using the Email Dropbox ==&lt;br /&gt;
As of the current version, there are four ways of using the email dropbox:&lt;br /&gt;
;CC&lt;br /&gt;
: When sending an email to a contact, include the email alias in the CC field, and the email will be attached to the contact as an outgoing email.&lt;br /&gt;
;Forward&lt;br /&gt;
: After receiving an email from a contact, forward it to the email alias. It will be attached to the contact as an incoming email.&lt;br /&gt;
;Direct&lt;br /&gt;
: Send an email directly to the alias, '''without &amp;quot;Fwd:&amp;quot; in the subject'''. A post in the social feed will be created using the contents of the email's body.&lt;br /&gt;
;Case Attachment&lt;br /&gt;
: Same as forward or CC, but include a user-defined code in the email body to specify that the email should be converted to/attached to a case in the Services module.&lt;br /&gt;
&lt;br /&gt;
== Direct Integration ==&lt;br /&gt;
This set-up method works by locally sending the email contents directly to X2Engine through the system console. It is more straightforward to configure, but requires that the MTA and web server hosting X2Engine be on the same machine, virtual or physical. Furthermore, it can run into file permissions/ownership issues.&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Using CPanel, Webmin/Virtualmin, or any other web host administrative tool, create a mail alias on the server that begins with &amp;quot;dropbox@&amp;quot;, i.e. &amp;quot;dropbox@yourdomain.com&amp;quot;. (Note: you can also do this manually by editing the mail server's configuration files, although doing that is beyond the scope of this guide.)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Find the absolute path on the web server's filesystem to X2Engine, if you're not sure where it is already:&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type:lower-alpha&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Paste the following into a PHP file called &amp;quot;path.php&amp;quot;, in the same directory as X2Engine: &amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&amp;lt;?php echo realpath(dirname(__FILE__)); ?&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Navigate to the file using a web browser&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Record the path, append &amp;quot;/email.php&amp;quot;, and use the resulting string as the path to the capture script in the mail alias.&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;Delete the file &amp;quot;path.php&amp;quot; from the server.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Create an email alias. Set its destination a pipe to a program: '''&amp;lt;tt&amp;gt;/usr/bin/php /path/to/X2Engine/email.php&amp;lt;/tt&amp;gt;''' (versions up to 2.5.2) or '''&amp;lt;tt&amp;gt;/path/to/X2Engine/protected/yiic emaildropbox&amp;lt;/tt&amp;gt;''' (versions 2.7 and later)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;(X2Engine versions 2.7 and later) Change the permissions on the &amp;lt;tt&amp;gt;protected/runtime&amp;lt;/tt&amp;gt; folder to '''777''' (all users can read/write).&amp;lt;ref&amp;gt;If you cannot do this for security purposes, but are a system administrator, you can instead change them to 770. If you do so, however, you must change the group ownership of the directory to the group under which the MTA spawns processes (typically &amp;quot;nobody&amp;quot; or &amp;quot;nogroup&amp;quot;).&amp;lt;/ref&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Test the alias by sending a message to a fictitious name/email address (i.e. &amp;lt;tt&amp;gt;&amp;quot;Sue Doenimm&amp;quot; &amp;lt;test@example.com&amp;gt;&amp;lt;/tt&amp;gt;) and CC-ing the mail alias. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Check in the Contacts module after sending the email, and if the fictitious contact was created, check to see that the email was attached properly to the contact record. If the contact was not created or the email was not imported, check the logs of the MTA for any errors.&lt;br /&gt;
&amp;lt;li&amp;gt;Test to see if your email software's forwarded message format is supported by forwarding an email from a contact to the mail alias.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== API Integration ==&lt;br /&gt;
This method works by sending the email contents to X2Engine through the remote API, and thus permits the MTA and X2Engine to live on different servers. Similar to the direct method, an alias will need to be constructed to receive the email and send it to a program, but in this case the program acts as a proxy by sending the contents to X2Engine via a web request. This method is more flexible, and it is far less likely to result in file permission issues (i.e. when the MTA attempts to run the Yii console application), but takes slightly more effort to set up.&lt;br /&gt;
&lt;br /&gt;
For information on API authentication, see [[Remote_API#Authenticating|Remote API: Authenticating]]. &lt;br /&gt;
&lt;br /&gt;
The setup process is as follows: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;'''Obtain the API script.''' Using your file/FTP manager of choice, navigate to the &amp;lt;tt&amp;gt;protected&amp;lt;/tt&amp;gt; folder inside X2Engine, find the &amp;lt;tt&amp;gt;integration&amp;lt;/tt&amp;gt; folder, and inside of that, navigate to the &amp;quot;MTA&amp;quot; folder.&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;Download/copy &amp;lt;tt&amp;gt;emailImport.php&amp;lt;/tt&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
 &amp;lt;li&amp;gt;Open the file in your editor of choice, and look for the following lines of code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
///////////////////////////&lt;br /&gt;
// Configuration details //&lt;br /&gt;
///////////////////////////&lt;br /&gt;
// Set this to the IP address or domain name of the server&lt;br /&gt;
$host = '';&lt;br /&gt;
// Set this to the protocol (use &amp;quot;https://&amp;quot; for an SSL-enabled web server)&lt;br /&gt;
$proto = 'http://';&lt;br /&gt;
// Set this to the URI on the web server of X2Engine, without the trailing slash.&lt;br /&gt;
// So, if the login URL is &amp;quot;http://example.com/X2Engine/index.php/site/login&amp;quot;,&lt;br /&gt;
// this variable should be &amp;quot;/X2Engine&amp;quot;&lt;br /&gt;
$baseUri = '';&lt;br /&gt;
// Leave this null if the host specified by $host will resolve correctly.&lt;br /&gt;
// Otherwise, if in an environment where (for instance) the domain does not resolve&lt;br /&gt;
// properly, and the IP address must be used, but the CRM is on a specifically-named&lt;br /&gt;
// virtual host on a shared IP, set this to the domain name of that host, and set&lt;br /&gt;
// $host to the IP address of the web server.&lt;br /&gt;
$hostName = '';&lt;br /&gt;
$data = array(&lt;br /&gt;
	'user' =&amp;gt; '',&lt;br /&gt;
	'userKey' =&amp;gt; '',&lt;br /&gt;
);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Change the variables according to their comments by putting the appropriate values in the (currently empty) pairs of single quotes. For instance, if your CRM is hosted at &amp;quot;https://crm.domain.com/crm&amp;quot;, you will put &amp;quot;https://&amp;quot; in for &amp;lt;tt&amp;gt;$proto&amp;lt;/tt&amp;gt;, &amp;quot;crm.domain.com&amp;quot; for &amp;lt;tt&amp;gt;$host&amp;lt;/tt&amp;gt;, and &amp;quot;/crm&amp;quot; for &amp;lt;tt&amp;gt;$baseUri&amp;lt;/tt&amp;gt;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;In the &amp;lt;tt&amp;gt;$data&amp;lt;/tt&amp;gt; array, set the &amp;lt;tt&amp;gt;user&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;userKey&amp;lt;/tt&amp;gt; to the API user and API key to be used (see: [[Remote_API#Authenticating|Remote API: Authenticating]]). So, for &amp;quot;admin&amp;quot; and key &amp;quot;aabbccddee&amp;quot;: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$data = array(&lt;br /&gt;
	'user' =&amp;gt; 'admin',&lt;br /&gt;
	'userKey' =&amp;gt; 'aabbccddee',&lt;br /&gt;
);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Upload the script to the server to be handling email.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ensure the script has proper ownership and permissions to be run by the MTA user. If you're not sure what user the MTA will run under when executing mail handling scripts, set the permissions on emailImport.php to '''755''' (all can read, owner/group can write, all can execute)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Create an email alias on the server to be handling email, which pipes to the program: '''/usr/bin/php /path/to/emailImport.php''' (replacing &amp;quot;/path/to&amp;quot; with the actual filesystem path where you uploaded the script).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
Due to how this feature requires interaction between multiple software systems, a non-functioning email dropbox can have a very wide variety of possible causes.&lt;br /&gt;
=== Email is not captured ===&lt;br /&gt;
It may be that mail is not actually getting transmitted to X2Engine in the first place. You should see something in the MTA logs that looks a bit like this (i.e. if you're using Postfix and the &amp;quot;direct&amp;quot; integration method):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;Feb 10 10:28:21 HOSTNAME postfix/local[2546]: D8C0B13613CB: to=&amp;lt;dropbox-USER@DOMAIN&amp;gt;, orig_to=&amp;lt;USER@DOMAIN&amp;gt;, relay=local, delay=1.2, delays=0.86/0/0/0.39, dsn=2.0.0, status=sent (delivered to command: /home/USER/public_html/protected/yiic emaildropbox)&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the case of API integration, substitute the &amp;quot;yiic&amp;quot; command with &amp;quot;/usr/bin/php /path/to/emailImport.php&amp;quot;; one way or another, what's happening on the most basic level is that email is getting handled by a program rather than going into a mailbox.&lt;br /&gt;
&lt;br /&gt;
If you can verify that this event happened (delivery to a local mail handling program), and no error email response is received, but the dropbox &amp;quot;silently&amp;quot; fails (by not capturing the email), verify the following:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Your user profile email address matches the address from which you are sending email.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If using the API method of integration, check:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The domain name of the X2Engine-hosting server is resolvable on the mail host&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The host with X2Engine on it can be accessed from the mail host via a HTTP (web) request&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If X2Engine is on a server that is behind a firewall, port 80 (or 443, if using HTTPS) on the external IP address is forwarded to the X2Engine web host&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The API user and user key are correct in the API configuration&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If you have &amp;quot;Create Contacts from Emails&amp;quot; disabled, the recipient address of the email (or original sender, if you are forwarding the email) matches that of an existing contact in X2Engine&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Email rejected with error message ===&lt;br /&gt;
Verify:&lt;br /&gt;
* Correct email server settings, DNS, and email alias&lt;br /&gt;
* Correct permissions/ownership on all scripts run by the MTA&lt;br /&gt;
&lt;br /&gt;
=== (API Method) No request to X2Engine showed up in the web server logs ===&lt;br /&gt;
This is due to one of the following problems:&lt;br /&gt;
# The mail handling server never received the message&lt;br /&gt;
# Any of the same conditions that would cause the MTA to bounce the email back to the sender with an error message&lt;br /&gt;
# The mail handling server couldn't connect to X2Engine's server&lt;br /&gt;
Ultimately, it boils down to there being no network connection between the mail handling server and X2Engine to begin with.&lt;br /&gt;
&lt;br /&gt;
To investigate if #1 and #2, first look at the MTA's logs. They are typically stored in /var/log, and named &amp;lt;tt&amp;gt;maillog&amp;lt;/tt&amp;gt; (RHEL/CentOS) or &amp;lt;tt&amp;gt;mail.log&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;mail.err&amp;lt;/tt&amp;gt; (Debian/Ubuntu). If there is no record of mail received:&lt;br /&gt;
* Does the mail handling server have a fully-qualified domain name?&lt;br /&gt;
* Check the MTA's configuration. Is it configured to allow receiving mail for the system's FQDN?&lt;br /&gt;
* Is there a route to the mail host from the internet? And, are the necessary ports open for receiving mail?&lt;br /&gt;
&lt;br /&gt;
Otherwise, if there are lines in the mail log(s) matching the alias, they will most often immediately indicate what went wrong. In such cases, the issue will typically be one of an improperly typed pipe alias (i.e. feeding directly to the script, rather than the PHP interpreter which runs the script), or permissions (meaning, Postfix child processes cannot read the import script file). Note that each node (parent directory) in the path to the script must be executable by the Postfix subprocess; else it cannot access anything within.&lt;br /&gt;
&lt;br /&gt;
If, on the other hand (#3) there were no errors reported in the mail log for delivery to the alias, the problem is at the level of connecting between servers. Thus, you must verify:&lt;br /&gt;
* Is the domain name of the web server correct?&lt;br /&gt;
* Can the web server of the CRM be resolved to the proper IP address on the mail server?&lt;br /&gt;
* Can HTTP connections can be made to the server (i.e. verify the port isn't blocked, a valid route exists to the host, etc.)?&lt;br /&gt;
* Is the php_curl extension available in the command line environment on the mail handling server?&lt;br /&gt;
&lt;br /&gt;
=== Response email regarding an unsupported forwarded message format ===&lt;br /&gt;
Forward the the email to [mailto:customersupport@x2engine.com X2Engine Customer Support], using the same email software that was used to test the feature. Due to the great diversity of email software and the inconsistency of forwarded/attached message formatting across platforms, the forwarded message capture may not immediately work with your email software of choice. However, per request, support for new forwarded message formats will be added in the next release.&lt;br /&gt;
&lt;br /&gt;
= Notes =&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tony Zavala</name></author>	</entry>

	<entry>
		<id>http://wiki.x2crm.com/index.php?title=VoIP_Integration&amp;diff=1854</id>
		<title>VoIP Integration</title>
		<link rel="alternate" type="text/html" href="http://wiki.x2crm.com/index.php?title=VoIP_Integration&amp;diff=1854"/>
				<updated>2014-07-10T19:39:23Z</updated>
		
		<summary type="html">&lt;p&gt;Tony Zavala: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Development]]&lt;br /&gt;
To a limited extent, X2Engine currently supports integration with VoIP phone systems (such as Asterisk servers) in the form of inbound call notifications and &amp;quot;screen pops&amp;quot;. While this is still somewhat a proof-of-concept, setting it up to work is fully within the reach of the technically-inclined user with administrative access to the VoIP system and X2Engine installation, and it is very useful in expediting the retrieval of customer data when taking a call.&lt;br /&gt;
&lt;br /&gt;
= What it does =&lt;br /&gt;
A customer, whose phone number is saved in X2Engine, calls the organization. As soon as the call session is initiated with the VoIP system, the VoIP system makes a web request to X2Engine's [[Web_API_Reference_%28Legacy%29#Inbound_VoIP_call_notifications|web API]] with the caller ID. The call is then recorded, and shows up inside X2Engine, in three places: &lt;br /&gt;
# The activity feed, with a link to the contact;&lt;br /&gt;
# As a notification for the user who has been assigned that contact, or for all users if the contact is unassigned;&lt;br /&gt;
# In the action history on that contact record.&lt;br /&gt;
Additionally, if the contact is not assigned to &amp;quot;anyone&amp;quot;, and the user to whom the contact is assigned does not have pop-up blocking enabled, a pop-up window will appear on the assignee's screen displaying the contact record, thus immediately displaying to that representative the full history of interaction with the customer.&lt;br /&gt;
&lt;br /&gt;
= What it requires in order to work =&lt;br /&gt;
In essence, at the most basic level, the phone system must be connected to the internet, and must be configurable such that it makes an appropriate HTTP/HTTPS request (of type &amp;lt;tt&amp;gt;GET&amp;lt;/tt&amp;gt;) to X2Engine at the right time. The procedure for implementing this customization can vary widely between phone systems, but how the essential API call must be made is the same in all cases and is described in [[Web_API_Reference_%28Legacy%29#Inbound_VoIP_call_notifications|Remote API: Inbound VoIP call notifications]].&lt;br /&gt;
&lt;br /&gt;
If the VoIP system is Asterisk-based, supports AGI interaction, and has PHP installed on it, a script included in the source code of X2Engine Professional Edition can be used instead of having to write a script from scratch. The rest of this article will cover the usage of this script.&lt;br /&gt;
&lt;br /&gt;
= Using the included script for Asterisk integration =&lt;br /&gt;
The script for Asterisk integration, named &amp;lt;tt&amp;gt;callX2Engine.php&amp;lt;/tt&amp;gt;, is included in the X2Engine source code (in Professional Edition) inside the directory &amp;lt;tt&amp;gt;protected/integration/FreePBX&amp;lt;/tt&amp;gt;. It requires the following two files be present in the same directory where it will run:&lt;br /&gt;
# The [http://phpagi.sourceforge.net/ PHPAGI] class (and with the filename &amp;lt;tt&amp;gt;phpagi.php&amp;lt;/tt&amp;gt;)&lt;br /&gt;
# A copy of the standalone APIModel class from X2Engine, which can be found in &amp;lt;tt&amp;gt;protected/models&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All three of these files (&amp;lt;tt&amp;gt;callX2Engine.php&amp;lt;/tt&amp;gt; and its dependencies) must then be placed in the &amp;lt;tt&amp;gt;agi-bin&amp;lt;/tt&amp;gt; directory on the Asterisk server to allow easily inserting it as an application call into the dialplan. &lt;br /&gt;
&lt;br /&gt;
Finally, the script itself must be configured appropriately. Near the top of the file, one will find the following global string variables that must be properly defined:&lt;br /&gt;
;&amp;lt;tt&amp;gt;$baseUrl&amp;lt;/tt&amp;gt;&lt;br /&gt;
: The URL to the entry script (&amp;lt;tt&amp;gt;index.php&amp;lt;/tt&amp;gt;) of X2Engine. For example, if your CRM is hosted in http://example.com/crm, you will put for the value of this variable &amp;lt;tt&amp;gt;http://example.com/crm/index.php&amp;lt;/tt&amp;gt;.&lt;br /&gt;
;&amp;lt;tt&amp;gt;$user&amp;lt;/tt&amp;gt;&lt;br /&gt;
: The user of X2Engine to use for API authentication, when necessary.&lt;br /&gt;
;&amp;lt;tt&amp;gt;$userKey&amp;lt;/tt&amp;gt;&lt;br /&gt;
: The API key of the X2Engine user for API authentication.&lt;br /&gt;
&lt;br /&gt;
= Case example: FreePBX integration =&lt;br /&gt;
FreePBX can be configured to use the AGI script easily, by performing the following:&lt;br /&gt;
# Upload the dialplan file &amp;lt;tt&amp;gt;extensions_custom.conf&amp;lt;/tt&amp;gt; (you'll find it in the same directory as &amp;lt;tt&amp;gt;callX2Engine.php&amp;lt;/tt&amp;gt;) to replace the existing file in the Asterisk configuration directory on the phone system. In FreePBX distro, this directory will be &amp;lt;tt&amp;gt;/etc/asterisk&amp;lt;/tt&amp;gt;.&lt;br /&gt;
# As for the PHP scripts: the &amp;lt;tt&amp;gt;agi-bin&amp;lt;/tt&amp;gt; directory, in FreePBX distro, is located at &amp;lt;tt&amp;gt;/var/lib/asterisk/agi-bin&amp;lt;/tt&amp;gt;. Note, if using FreePBX distro, you should exclude &amp;lt;tt&amp;gt;phpagi.php&amp;lt;/tt&amp;gt;, because it is already present and available in the &amp;lt;tt&amp;gt;agi-bin&amp;lt;/tt&amp;gt; folder.&lt;br /&gt;
# Change the permissions on &amp;lt;tt&amp;gt;callX2Engine.php&amp;lt;/tt&amp;gt; to be executable and readable by the system user &amp;lt;tt&amp;gt;asterisk&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== What this all does ==&lt;br /&gt;
The file &amp;lt;tt&amp;gt;extensions_custom.conf&amp;lt;/tt&amp;gt; contains the following lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;; This file can be put in /etc/asterisk to configure a FreePBX-managed Asterisk system for&lt;br /&gt;
;; creating inbound call notifications in X2Engine.&lt;br /&gt;
[from-pstn-custom]&lt;br /&gt;
exten =&amp;gt; _.,1,AGI(callX2Engine.php)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
When the file is included by in FreePBX's default dialplan file (&amp;lt;tt&amp;gt;extensions.conf&amp;lt;/tt&amp;gt;), this &amp;lt;tt&amp;gt;[from-pstn-custom]&amp;lt;/tt&amp;gt; context will be &amp;quot;imported&amp;quot; into the corresponding non-custom context, &amp;lt;tt&amp;gt;[from-pstn]&amp;lt;/tt&amp;gt;. This context is entered by callers coming in from the PSTN (Public Switched Telephone Network). Thus, putting the extension that makes the AGI call in from-pstn-custom will make it so that whenever a call comes in through the SIP trunk from a &amp;quot;traditional&amp;quot; phone network, the AGI call will be made.&lt;/div&gt;</summary>
		<author><name>Tony Zavala</name></author>	</entry>

	<entry>
		<id>http://wiki.x2crm.com/index.php?title=Installation&amp;diff=1830</id>
		<title>Installation</title>
		<link rel="alternate" type="text/html" href="http://wiki.x2crm.com/index.php?title=Installation&amp;diff=1830"/>
				<updated>2014-05-28T16:48:37Z</updated>
		
		<summary type="html">&lt;p&gt;Tony Zavala: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Support]]&lt;br /&gt;
This article covers manual installation of X2Engine on a webserver. If this is your first time working with a web server, it is recommended that you first try installing via an automatic full-stack installer that will set up a self-contained web server environment for you. See [http://bitnami.org/stack/X2CRM Bitnami's X2Engine stack installers] for download links.&lt;br /&gt;
&lt;br /&gt;
= Before Installation =&lt;br /&gt;
Before installing X2Engine, you should first ensure that&lt;br /&gt;
* You have a web server&lt;br /&gt;
* You understand the basics of installing a PHP web application&lt;br /&gt;
* Your hosting environment is properly configured and meets all the minimum requirements&lt;br /&gt;
&lt;br /&gt;
== Required Knowledge ==&lt;br /&gt;
Installing X2Engine requires you are able to perform the following taks (and have basic knowledge of how to perform them):&lt;br /&gt;
# Upload files to a web server via a hosting file manager, FTP/SFTP, or otherwise&lt;br /&gt;
# Creating a MySQL database and a database user, if they aren't available already&lt;br /&gt;
# Using a web browser, and knowing what URL to use to access a location on the server&lt;br /&gt;
&lt;br /&gt;
If you are unsure of how to perform any of these, please ask for assistance on [http://x2community.com The X2Engine Forums].&lt;br /&gt;
&lt;br /&gt;
== System Requirements ==&lt;br /&gt;
You can quickly determine if your web server can run X2Engine by downloading the requirements checking script (link: [[requirements:|requirements.php]]), uploading it to your web server, and opening it in a web browser. When finished using the script, delete it; it displays detailed information about the server's PHP configuration. Displaying it publicly for indefinite time can pose a security risk; it could be useful to attackers. In general, the following are the absolute minimum requirements for installation:&lt;br /&gt;
&lt;br /&gt;
* A web server that can execute PHP.&lt;br /&gt;
* A password-protected '''MySQL''' database server connection, and a database on which the user of the connection has all rights (i.e. select, drop, create and update).&lt;br /&gt;
* '''PHP version 5.3 or later'''&lt;br /&gt;
* PHP must be run as the same system user that owns the directory where X2Engine will be installed.&lt;br /&gt;
&lt;br /&gt;
== If Requirements Are Not Met ==&lt;br /&gt;
=== Directory Ownership ===&lt;br /&gt;
If you are running a dedicated web server and/or have administrative access, please refer to [[Preparing_a_Linux_Server_Environment#Server_Preparation|Preparing a Webserver]].&lt;br /&gt;
&lt;br /&gt;
This is a hosting environment misconfiguration wherein files uploaded to the server are owned by a different system user than the user as whom PHP executes. It is an ease-of-use issue that many shared hosting providers still haven't gotten right. It can in most cases be resolved by changing the PHP gateway interface, i.e. from SuPHP to FCGI, using your hosting control panel ('''To correct this issue in CPanel''': see [http://docs.cpanel.net/twiki/bin/vief/EasyApache3/ApachePHPRequestHandling Apache PHP Request Handling]).&lt;br /&gt;
&lt;br /&gt;
You should also use a method of uploading files to the server that results in them having the same ownership as the &amp;quot;domain owner&amp;quot; (this terminology is used by most shared hosting providers). FTP services have been known to fail in this regard, whereas web-based file managers available in hosting control panels are often much more consistent. Uploading files with proper ownership will completely circumvent file permission and ownership issues.&lt;br /&gt;
&lt;br /&gt;
In any case, refer to your hosting provider's documentation. If the option to change the PHP execution mode does not appear to be available, contact the system administrator or customer service department of the hosting provider. If they don't give you a satisfactory answer, consider switching to a better web host. &amp;lt;ref&amp;gt;In a discussion on our forums, [http://x2community.com/topic/703-hosting-that-works/ &amp;quot;Hosting that works&amp;quot;], some users propose or advocate web hosts that they have had experiences with. A general consensus on GoDaddy (and our own professional opinion, based on repeated bad experiences) is that it is a very poor choice for hosting X2Engine.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== PHP Version ===&lt;br /&gt;
In some cases, it may be possible to enable PHP 5.3+ using an [http://httpd.apache.org/docs/2.2/howto/htaccess.html Apache override]; see &lt;br /&gt;
* [http://www.velvetblues.com/web-development-blog/activate-php-5-3-hostgator-godaddy/ Velvet Blues: How to Activate PHP 5.3 on HostGator and GoDaddy]&lt;br /&gt;
* [http://kb.siteground.com/article/How_to_have_different_Php__MySQL_versions.html SiteGround knowledge base: How to switch to a different PHP version]&lt;br /&gt;
By adding the appropriate directives to the &amp;lt;tt&amp;gt;.htaccess&amp;lt;/tt&amp;gt; file in the web root of X2Engine (NOT replacing the file, but changing it), the PHP version can ideally be set. You can test whether this method succeeds by re-visiting the requirements checker script and verifying that the PHP version in use is 5.3 or later.&lt;br /&gt;
&lt;br /&gt;
In other cases, it may be possible to enable later versions of PHP via the web hosting control interface (i.e. CPanel or Webmin). Otherwise, the only option will be to contact the hosting provider and request that version 5.3 be made available.&lt;br /&gt;
&lt;br /&gt;
=== PHP Extensions ===&lt;br /&gt;
If your server does not meet the minimum system requirements for running X2Engine, and you are a system administrator of your server, you will be able to install the necessary modules. Note, however, that as of the most recent version, the MySQL PDO extension is the only extension used by X2Engine that isn't included by default and always enabled in PHP 5.3; the reflection class and extensions SPL, PCRE and Ctype should all be available if PHP is at version 5.3 or later.&lt;br /&gt;
&lt;br /&gt;
In most distributions of Linux, PHP extensions can be easily installed by the distribution's default [[wikipedia:Package management system|Package management system]]. That is the recommended method of installing them; in most cases, the package manager will automatically configure and reload the HTTP server to enable them.&lt;br /&gt;
&lt;br /&gt;
On Ubuntu &amp;amp;amp; Debian: the extension &amp;lt;tt&amp;gt;mbstring&amp;lt;/tt&amp;gt; will typically be included in the Apache module package.&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo apt-get install php5-mysql php5-curl&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On CentOS (6+), the mbstring extension must be installed separately with other missing modules:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo yum install php-pdo php-mbstring php-common curl&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing Without All Requirements: What Won't Work ==&lt;br /&gt;
'''This section is obsolete as of 3/26/2013.''' The severity of each missing requirement, in addition to explanation of what functionality will be unavailable/broken for each missing requirement, has been written directly into the requirements check script and should be displayed there. Thus, it is no longer necessary to list them here, although the list as it was last maintained is left here for archival/demonstrative purposes.&lt;br /&gt;
&lt;br /&gt;
If your server environment does not meet the minimum system requirements, and it is not possible to add PHP extensions, you can still install X2Engine, though it is '''not''' recommended. Note the following issues that can occur:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; align=&amp;quot;left&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Deficiency&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Severity&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Problems/Notes&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | Zip extension missing&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;span style=&amp;quot;background-color:yellow&amp;quot;&amp;gt;Minor&amp;lt;/span&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Cannot import or export custom modules.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | cURL extension missing&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;span style=&amp;quot;background-color:yellow&amp;quot;&amp;gt;Minor&amp;lt;/span&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* Google integration will not work&lt;br /&gt;
* Time zone widget will not work&lt;br /&gt;
* Contact views may be inaccessible &amp;lt;ref&amp;gt;[http://x2community.com/index.php?/topic/386-cant-open-contact-view/ X2Community Forums: &amp;quot;Can't open contact View&amp;quot;]&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Cannot use local scripts that make API calls&lt;br /&gt;
* Cannot use built-in error reporter&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | allow_url_fopen set to &amp;quot;No&amp;quot;/0 in PHP configuration&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;span style=&amp;quot;background-color:orange&amp;quot;&amp;gt;Major&amp;lt;/span&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Cannot receive software updates using the built-in update utility, and cannot receive notifications of new software versions from within the app.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | Directory ownership mismatch&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;span style=&amp;quot;background-color:orange&amp;quot;&amp;gt;Major&amp;lt;/span&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Application cannot be updated and cannot run unless the permissions on all files and directories are set to allow any system user to read/write &amp;lt;strong&amp;gt;(not recommended)&amp;lt;/strong&amp;gt;. The application uses file-based caching and also creates files and folders during software updates, both of which require write access to the filesystem.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | json extension missing&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;span style=&amp;quot;background-color:orange&amp;quot;&amp;gt;Major&amp;lt;/span&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Numerous components and features will not work; the json_encode function is used throughout the application&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | PHP version earlier than 5.3&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;span style=&amp;quot;background-color:red; color:white; font-weight:bold;&amp;quot;&amp;gt;Fatal&amp;lt;/span&amp;gt;&lt;br /&gt;
|Numerous fatal errors, including errors that inhibit installation&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | mbstring extension missing&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;span style=&amp;quot;background-color:red; color:white; font-weight:bold;&amp;quot;&amp;gt;Fatal&amp;lt;/span&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Application crashes upon login with &amp;quot;invalid unicode sequence&amp;quot; error.&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | pdo_mysql extension missing&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;span style=&amp;quot;background-color:red; color:white; font-weight:bold;&amp;quot;&amp;gt;Fatal&amp;lt;/span&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Application cannot run; no database connection is possible. It is a requirement of [http://www.yiiframework.com/ Yii Framework].&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | Any other PHP extensions listed as required but missing&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;span style=&amp;quot;background-color:red; color:white; font-weight:bold;&amp;quot;&amp;gt;Fatal&amp;lt;/span&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Application cannot run (requirements of Yii)&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;row&amp;quot; | Outdated PCRE library version&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;span style=&amp;quot;background-color:red; color:white; font-weight:bold;&amp;quot;&amp;gt;Fatal&amp;lt;/span&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
Application cannot run. Regex used in URL rules requires the &amp;quot;?J&amp;quot; group type, which was added to PCRE in version 7.4 (September 21, 2007)&amp;lt;ref&amp;gt;[http://www.pcre.org/changelog.txt PCRE Changelog]&amp;lt;/ref&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Recommended System ==&lt;br /&gt;
The following attributes of the hosting environment are by no means required. However, they are the same as the primary servers on which X2Engine is most commonly developed and tested, and thus would be the most likely to never cause problems:&lt;br /&gt;
* PHP 5.3.10 and later&lt;br /&gt;
* MySQL 5.5&lt;br /&gt;
* Apache 2.2 with [http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html mod_rewrite] enabled. &lt;br /&gt;
* Ubuntu 12.04 LTS, CentOS 6.3, or Amazon Linux&lt;br /&gt;
&lt;br /&gt;
If only Windows is available, the environment provided by [http://www.wampserver.com/ WampServer] is recommended, especially for development.&lt;br /&gt;
&lt;br /&gt;
= Installing =&lt;br /&gt;
== Using The Installation Page ==&lt;br /&gt;
Browser-based installation generally proceeds as follows:&lt;br /&gt;
# Make sure a MySQL database and a database user with full permissions to that database are available from the web server.&lt;br /&gt;
# Upload the contents of the &amp;lt;tt&amp;gt;x2engine&amp;lt;/tt&amp;gt; folder to the document root of the web server, or a subdirectory if desired.&lt;br /&gt;
# Navigate to the webroot (or subdirectory) where the contents of the folder were uploaded.&lt;br /&gt;
# Fill out the installation form. '''Note the following:'''&lt;br /&gt;
#* If you leave &amp;quot;Create Sample Data&amp;quot; checked, the installer will insert fictitious contact, user, account and action records into the initial installation for testing purposes. Uncheck the box if this is not desired.&lt;br /&gt;
#* You can first test the database connection without losing the installation form by using the &amp;quot;Test Connection&amp;quot; button. Doing this before clicking the install button is highly recommended.&lt;br /&gt;
&lt;br /&gt;
== Using The Command Line Installer == &lt;br /&gt;
It is possible to install X2Engine from the command line via SSH or otherwise. This is performed as follows:&lt;br /&gt;
# There is a script in the root of the web application named &amp;lt;tt&amp;gt;installConfig.php&amp;lt;/tt&amp;gt;. Fill it with the same information that would be submitted by the installation page form. If you are installing a commercial edition of X2Engine, fill the variable &amp;lt;tt&amp;gt;$unique_id&amp;lt;/tt&amp;gt; with your product key.&lt;br /&gt;
# Change directory into the root folder of the web application.&lt;br /&gt;
# Run: &amp;lt;pre&amp;gt;php initialize.php silent&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The configuration variables in &amp;lt;tt&amp;gt;installConfig.php&amp;lt;/tt&amp;gt; are as follows:&lt;br /&gt;
;host&lt;br /&gt;
: The (MySQL) database hostname&lt;br /&gt;
;db&lt;br /&gt;
: The database name&lt;br /&gt;
;user&lt;br /&gt;
: The database username&lt;br /&gt;
;pass&lt;br /&gt;
: The database password&lt;br /&gt;
;app&lt;br /&gt;
: The application name (i.e. &amp;quot;Company X CRM&amp;quot;) that shows up in various places throughout the app.&lt;br /&gt;
;currency&lt;br /&gt;
: The 3-letter code for the currency to be used in quotes and opportunities. Currently supported currencies include: USD,EUR,GBP,CAD,JPY,CNY,CHF,INR, and BRL.&lt;br /&gt;
;lang&lt;br /&gt;
: The application's language.&lt;br /&gt;
;timezone&lt;br /&gt;
: The time zone. It must be a valid timezone alias; see [http://php.net/manual/en/timezones.php List of supported time zones] for more info.&lt;br /&gt;
;adminEmail&lt;br /&gt;
: The email address of the application's owner&lt;br /&gt;
;adminPassword&lt;br /&gt;
: The administrator's application password&lt;br /&gt;
;adminUsername&lt;br /&gt;
: The username of the administrator&lt;br /&gt;
;dummyData&lt;br /&gt;
: Whether to include sample data in the installation, for evaluative purposes&lt;br /&gt;
;webLeadUrl&lt;br /&gt;
: The base URL of the web application.&lt;br /&gt;
;unique_id&lt;br /&gt;
: The product key, if installing a commercial edition. In Open Source Edition, it can simply be left &amp;quot;none&amp;quot;. If it is &amp;quot;none&amp;quot; in Open Source Edition, the user will need to enable software updates separately by going to &amp;quot;Updater Settings&amp;quot; in the administrative index, in the &amp;quot;System Settings&amp;quot; section.&lt;br /&gt;
;visibleModules&lt;br /&gt;
: Initial module visibility setting; a comma-delineated list of modules to be displayed in the menu at the top of the CRM.&lt;br /&gt;
;test_db&lt;br /&gt;
: Set this to 1 if constructing a unit/functional testing environment (see [[Test-Driven_Development#Preparing_a_testing_database|Test-driven Development: preparing a testing database]])&lt;br /&gt;
;test_url&lt;br /&gt;
: If installing a testing environment, the URL to the &amp;quot;index-test.php&amp;quot; entry script that web tests will use.&lt;br /&gt;
;installType&lt;br /&gt;
: Installation type to report to the updates server. This is a setting that is used for internal reporting/statistical purposes and should be left as-is.&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous Post-Installation Tasks =&lt;br /&gt;
== Configuring the &amp;quot;Email Dropbox&amp;quot; ==&lt;br /&gt;
This section has been moved to the article: &amp;quot;[[E-Mail Configuration]]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Tony Zavala</name></author>	</entry>

	</feed>