Hey all,
Need to change SMTP Port for ALL Users, but having a time finding the table in which they are stored.
Does anyone know this? Are they encoded in users.user_preferences?
Thanks
Hey all,
Need to change SMTP Port for ALL Users, but having a time finding the table in which they are stored.
Does anyone know this? Are they encoded in users.user_preferences?
Thanks
tj@estreet.com,
It looks like it's in the content column of user_preferences.
select * from user_preferences
where category = 'global'
Since it's all scrambled it may be easiest to write a php script where you select all your users and update their preferences one-by-one.
PHP Code:$results = $this->db->query('SELECT id FROM users WHERE deleted = 0');;
while($row = $this->db->fetchByAssoc($results )) {
$focus = new User();
$focus->retrieve($row['id']);
$focus->setPreference('mail_smtpport','25', 0, 'global', $focus);
}
Thanks eggsurplus,
That worked -- sort of. Just can't get a connection on new port (port25 now blocked by access provider - comcast!
Still not clear on the parameters "setPreference('mail_smtpport','25', 0, 'global', $focus); " in the script you offered,
nor how you found it but should anyone be interested the following incarnation of the script also unexpectedly alters
mail_smtpserver,
mail_fromaddress, and
mail_smtp_fromname
WHEN inserted into Users/EditView.php after
"global $mod_strings;
$admin = new Administration();
$admin->retrieveSettings();
$focus = new User();Still, manually resetting server, fromaaddress and fromname I have yet to succeed in getting a connection to our mailserver, returning send errors with the following in php_error.logPHP Code:$result = mysql_query('SELECT id FROM users WHERE deleted = 0');
while ($row = mysql_fetch_assoc($result)) {
$focus->retrieve($row['id']);
$focus->setPreference('mail_smtpport','port', 0, 'global', $focus);
}
As if it weren't difficult enough getting Sugar Mail et.al. whipped into some usable configuration, now[21-Jun-2007 08:06:53] PHP Warning: fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]:
unable to connect to relay.estreet.comort
(
A connection attempt failed because the connected party did not properly respond after a period of time,
or established connection failed because connected host has failed to respond.
)
in C:\AreaPro\wamp\www\crm\include\phpmailer\class.sm tp.php on line 105
with port 25 newly blocked by comcast and failing attempts to reset the port, I'm wondering if we might not
be better served setting up for sendmail instead?? Can this be done on a wamp stack?
Last edited by tj@estreet.com; 2007-06-21 at 11:16 PM.
It absolutely will change the other fields if you insert it into an exsiting Sugar file like EditView.php. The script example I provided was intended to be used in a fresh script that you can either run from a command-line or from hitting a stand-alone page in your browser.
Sucks that comcast is blocking that port. If this is for your company's ISP you should be able to get it unblocked. Sendmail is very doable but we just had to switch from sendmail to SMTP due to some issues with external spam filters blocking our emails on the recipient side.
Sorry to hear your need to switch to SMTP.
While thought of switching to sendmail sends shivers up MY spine
(looked into it briefly on our first go round with Sugar Mail 8 -9 months back)
I was considering it -- just the same.
Damned pesky spam filters!
Unblocking is apparently a non-starter with comacst (corporate thugs!)
which leaves us trying to get Sugar Mail to accept port.
Does anyone have any experience with this? Are our efforts in vain?
By the way, I have mentioned in other threads, but on the subject of spam filters in this context
I thought a word of caution might be worth mentioning again.
Be wary of campaining to all AOL addresses as their SpamCop can cause you BIG TROUBLES
When AOL users report spam via SpamCop , AOL blocks mail from your mail server...
and for ALL domains (hundreds of domains) on that mail server from sending mail to AOL.
Last edited by tj@estreet.com; 2007-06-21 at 11:18 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks