[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Poco Forums • View topic - Change "Account Server Settings" via Pocoscript

Change "Account Server Settings" via Pocoscript

Scripting questions and ideas

Moderators: Eric, Tomas, robin, Michael

Change "Account Server Settings" via Pocoscript

Postby helloharry » Thu Sep 02, 2004 6:33 am

Hello all:

I have an issue with SMTP sending mails via Bellsouth. I use one installation of Pocomail (on a USB stick) at my home comuter with Bellsouth DSL access and in my office with university access to the internet.
From home I can send SMTP mails only via the Bellsouth account. But at work this access does not work, since my IP there is not within the Bellsouth network. Unfortunately they do not accept a login procedure with UserID and Password.

Now my question:
Is it possible to access the following parameter with a Pocoscript:
Accounts - Outgoing - Account Server Settings
It is stored in accounts.ini under the respective account in the variable "IsOutgoing=0/1".
By this way I could simply by one mouse click activate an accounts individual setting and have the general "Bellsouth settings" if I deactivate the accounts settings.

I hope, this all made sense what I wrote and I appreciate any help to get around this problem.
helloharry
Poco Tourist
 
Posts: 32
Joined: Wed Aug 04, 2004 9:28 am

Postby robin » Thu Sep 02, 2004 6:43 am

Take a look in the PocoScript help, particularly for SetSMTP and ReadSMTP. You could set this for BellSouth and your university ISP.
robin
 

Postby helloharry » Thu Sep 02, 2004 6:57 am

With the SetSMTP command I can indeed set a different SMTP server in the individual settings of an account. But still I cannot change the login information. The Bellsouth server does not handle any login, whereas my other account needs that information.
helloharry
Poco Tourist
 
Posts: 32
Joined: Wed Aug 04, 2004 9:28 am

Postby robin » Thu Sep 02, 2004 8:13 am

OK, I understand the problem now. I'm no expert on Pocoscript but maybe someone else who posts here can help you. Sorry.
robin
 

Postby helloharry » Thu Sep 02, 2004 8:27 am

That's alright. Thank you anyway!
helloharry
Poco Tourist
 
Posts: 32
Joined: Wed Aug 04, 2004 9:28 am

Postby Hogyt » Thu Sep 02, 2004 8:29 am

Instead of changing the account settings for one account, could you use two different accounts with different settings, one for home use and one for university use?
Mat
Hogyt
Poco Enthusiast
 
Posts: 241
Joined: Thu Jul 29, 2004 11:22 am
Location: England

Postby helloharry » Thu Sep 02, 2004 8:59 am

Interesting idea. Still I would like to make a decision at the start of PM which of these two accounts is used to receive mail, since that one is the account for replies.
helloharry
Poco Tourist
 
Posts: 32
Joined: Wed Aug 04, 2004 9:28 am

Postby Hogyt » Thu Sep 02, 2004 9:03 am

You could use the PocoScript command SetAccount to change between them. Perhaps you could have a script that uses InputBox to ask you which account to use, and run that as an OnStart event each time PocoMail starts?
Mat
Hogyt
Poco Enthusiast
 
Posts: 241
Joined: Thu Jul 29, 2004 11:22 am
Location: England

Postby helloharry » Thu Sep 02, 2004 9:49 am

AS far as I understand, SetAccount only determines the account to use if I start a new mail. It would have no effect on the account to use when I use reply.
The scipt to be called at the startup would need to decide, which of the both accounts is used for timed check of mail. This would be the variable CheckMail=0/1 or CheckMailTimed=0/1.
helloharry
Poco Tourist
 
Posts: 32
Joined: Wed Aug 04, 2004 9:28 am

Postby Hogyt » Thu Sep 02, 2004 10:22 am

SetAccount doesn't work, you're right.

This isn't a particularly elegant way of doing it but it seems to work. There's bound to be a better method but i have no idea what it is...

Create two accounts, one for home use and one for university. Create a script called "Choose account" with the code:

Code: Select all
InputBox $account "Select an account to use for this session%accounts%" "Default"
ExportVar $account


Create another script called "Set account" with the code:

Code: Select all
Set $path $scriptpath
AddStrings $path "Choose Account.ini"
ImportVar $account $path
DeleteHeader "X-Account:" %message
AddHeader %message "X-Account:" $account


Note that if you call the first script something different then you'll need to change the second line of the second script to have the same name. In the first script change "Default" to a default account to be selected.

Add the first script to run as an OnStart event. Add the second script to run as an OnCompose, OnReply and any other relevant events.

When you start PocoMail it'll ask you which account to use. When you create a new email or reply to one it should set the account to the one you selected at start up. Fingers crossed ;-)
Mat
Hogyt
Poco Enthusiast
 
Posts: 241
Joined: Thu Jul 29, 2004 11:22 am
Location: England

Postby helloharry » Fri Sep 03, 2004 1:39 am

This is really a very tricky solution. Thank you very much!
But I probably will try another work around, since I have more than one mail account which makes your solution a little extensive.
I am thinking of writing a small CMD script to change the respective parameter in accounts.ini before starting PM. So far, that would be the easiest way.
helloharry
Poco Tourist
 
Posts: 32
Joined: Wed Aug 04, 2004 9:28 am

Postby Pete » Fri Sep 03, 2004 5:05 am

The easiest solution of all is to use the same SMTP server in both locations. FastMail, for example, will let you use its server for a one-time fee of $14.95. Considering the time that you've spent on this problem, and the time that you might spend on it in the future, isn't it worth it to just pay some global email provider once and never have to worry about it again? :)
Pete
 

Postby robin » Fri Sep 03, 2004 5:24 am

This will work fine provided the university does not block access to port 25 / SMTP.
robin
 

Postby helloharry » Fri Sep 03, 2004 5:41 am

Not the university, but Bellsouth is blocking any access via port 25 but to their own mailserver.
helloharry
Poco Tourist
 
Posts: 32
Joined: Wed Aug 04, 2004 9:28 am

Postby robin » Fri Sep 03, 2004 5:55 am

...and of course, BellSouth don't provide you with an authenticated server (which you have to login to) so you can't access it outside their network...hmmm. Think that you might have be limited to one of the sctipt options, or trying to remember to manually change the account.

Here's another though...can you set up two different users and then nadger the .ini file so that the two point to the same user-directory on the disc? No, it looks like that won't work, I was looking for a setting like
Code: Select all
[user1]
Name=FredBloggs
Path=c:\poco\users\fredbloggs
[user2]
Name=JohnDoe
Path=c:\poco\users\johndoe
but Poco doesn't seem to work like that :(

Running out of things to try now :x
robin
 

Next

Return to PocoScript Help and How-To

Who is online

Users browsing this forum: No registered users and 2 guests

cron