<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix"><font face="Verdana">Joe,</font><br>
<br>
<font face="Verdana">Hi. The main issue is google apps or gmail
since they override the sender address by the login user. So all
emails arrived like: <a class="moz-txt-link-abbreviated" href="mailto:admin@crm.com">admin@crm.com</a> on behalf of
<a class="moz-txt-link-abbreviated" href="mailto:youruseremail@crm.com">youruseremail@crm.com</a></font><br>
<br>
<font face="Verdana">And usually the recipient respond to
<a class="moz-txt-link-abbreviated" href="mailto:admin@crm.com">admin@crm.com</a> and not the user. We have faced this issue many
times.</font><br>
<br>
Detlef,<br>
<br>
Thanks for the path. Maybe a better approach would be reading the
user info setup in mail manager since all the info you need is
already there. Or create these fields directly in user module
using vtlib this way they are editable using UI (My Preferences).
If you need an example please let me know.<br>
<br>
<font face="Verdana">Conrado</font><br>
<font face="Verdana"><br>
<br>
</font>On 11/21/2012 12:01 PM, Joe Bordes wrote:<br>
</div>
<blockquote cite="mid:50ACECB3.9050501@tsolucio.com" type="cite">
<pre wrap="">Hi,
vtiger_systems table is used for some other configurations. server_path
is used for the ftp backups
I do have one question: can you explain what motivates this change? I
mean, the application works correctly without this change in the
majority of servers, so why bother? What am I missing?
Joe
TSolucio
On 21/11/12 14:57, <a class="moz-txt-link-abbreviated" href="mailto:mail@dvoges.de">mail@dvoges.de</a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hello Community,
I solved the problem, that emails out of vtiger are send by one common
email account. With this solution it is possible to provide every user
an individual smtp account.
1) Changes in the DB (setting and values)
Table: ?vtiger_systems? New Column: "user" with varchar(63) => here is
the user name of the email sender which should match with
?vtiger_users?->?user_name?.
As ?vtiger_systems?->?Server_Type? I use the value ?usermail?.
The rest fields are filled with the individual outgoing mail server
account data.
Please pay attention to ?vtiger_systems_seq? and set the increases
index value of ?vtiger_systems?.
There is no GUI for register new entries, it has to be done manually by sql.
(Question: There is a field ?vtiger_systems?->?server_path? which is
not shown or editable in the vtiger gui, but it is necessary for our
email provider, is this a bug?)
2) Changes in the code
I replaced the function ?getFromEmailAddress? in the file
"\modules\MailManager\src\models\Draft.php" with
##############################################
function getFromEmailAddress() {
global $adb, $current_user;
$fromEmail = false;
if (Vtiger_Version::check('5.2.0', '>=')) {
$smtpFromResult = $adb->pquery('SELECT from_email_field FROM
vtiger_systems WHERE server_type=? and
user="'.$current_user->column_fields['user_name'].'"',
array('usermail'));
if ($adb->num_rows($smtpFromResult)) {
$fromEmail = decode_html($adb->query_result($smtpFromResult,
0, 'from_email_field'));
}
else {
$smtpFromResult = $adb->pquery('SELECT from_email_field FROM
vtiger_systems WHERE server_type=?', array('email'));
if ($adb->num_rows($smtpFromResult)) {
$fromEmail =
decode_html($adb->query_result($smtpFromResult, 0, 'from_email_field'));
}
}
}
if (empty($fromEmail)) $fromEmail = $current_user->column_fields['email1'];
return $fromEmail;
}
##############################################
The function at first tries to find an individual email by ?usermail?
and ?user->name?, if this has no result it uses the old method by
searching the ?mail? ? Data.
I would like to hear some feedback. Questions are also welcome.
Best wishes from Munich, Germany
Detlef Voges
_______________________________________________
<a class="moz-txt-link-freetext" href="http://www.vtiger.com/">http://www.vtiger.com/</a>
</pre>
</blockquote>
<pre wrap="">
_______________________________________________
<a class="moz-txt-link-freetext" href="http://www.vtiger.com/">http://www.vtiger.com/</a>
</pre>
</blockquote>
<br>
</body>
</html>