+ Reply to Thread
Results 1 to 6 of 6

Lotus Send/Receive mail not done immediately

  1. Lotus Send/Receive mail not done immediately

    As a newbie to Lotus Notes, I know I am probably asking too much in one
    shot. Please be patient to help me out if you can. Thanks in advance.

    With Lotus Notes 6.5.4 trial version, I have configured it to not to
    connect to Domino Server. I use my own POP3 and SMTP (both are
    localhost) for Internet mail transfer.

    First issue, after I create a memo/mail, it gets into the "Sent"
    box immediately. Then verifying through replicator page, I find the
    mail is held indefinitely in "Mail" folder of "Mail Router
    Mailbox". Then I would need to manually click on "Send Outgoing
    Mail" of Quickpick in order to complete the sending. How can I get
    mail to be sent immediately when "Send" button is clicked? Note,
    in my Internet location, I do set the "Transfer outgoing mail if"
    of Mail tab to "0" messages pending already.

    Second issue, when receiving an Internet mail, I know the mail has
    reached the local POP3 for the Lotus Notes client, but I would need to
    manually click on "Receive Mail" of Quickpick in order to complete
    the mail receiving and then press Refresh (F9) button to actually see
    it in the Inbox.

    Regarding the second issue: in mymail.nsf, I created an agent as
    following:

    //Agent name: ReceiveMail
    Database := @DbName;
    @Command([Replicator]);
    @Command([ReplicatorSendReceiveMail]);
    @Command([ReloadWindow])

    It appears to work from Action menu although I still need to hit
    Refresh (F9) button to view the new mail. The real problem, when
    executing the "agent.Open()" due to the mail arrival event in POP3
    as following, I got the error message in catch block as "Object or
    data is corrupted":

    LNNotesSession Session;
    LNDatabase Db;
    LNString DbTitle;
    LNAgent agent;

    LNSetThrowAllErrors(TRUE);

    try
    {
    Session.Init();

    Session.GetDatabase("C:\\Mydata\\lotus\\notes\\data\\mail\\mymail.nsf",
    &Db, ""); //using my own mail database

    Db.Open();
    if( Db.AgentExists("RecieveHongMail") )
    {
    Db.GetAgent("RecieveHongMail", &agent);
    agent.Open();
    agent.Execute();
    }
    }
    catch (LNSTATUS Lnerror)
    {
    char ErrorBuf[ERR_BUF_SIZE];
    LNGetErrorMessage(Lnerror, ErrorBuf, ERR_BUF_SIZE);
    cout << "Error: " << ErrorBuf << endl;
    }

    Db.Close();
    Session.Term();

    Then I try the similar agent in mynames.nsf with above C++ code;

    //RecieveMail2
    @Command([Replicator]);
    @Command([ReplicatorSendReceiveMail]);
    @Command([ReloadWindow])

    Again the UI action works for the agent and I still needs to hit
    Refresh (F9) button. This time, I got the "@Function is not valid in
    this context" error for "agent.Execut()". Note it passes the
    agent.Open() in this case.

    How can I fix the issues? As I am a newbie in Formula, LotusScript,
    etc. I do not know how to switch into mail box view in mynames.nsf with
    Formula. What is the equivalent Lotus Script code for the above agents?


  2. Re: Lotus Send/Receive mail not done immediately

    Try setting "Transfer outgoing mail if" to "1" - setting it to zero might
    mean 'never'.

    Tim Mohrlant - tmohrlant@NO_JUNK_MAIL_comcast.net (remove NO_JUNK_MAIL_)


    wrote in message
    news:1127311668.768828.315160@z14g2000cwz.googlegroups.com...
    > As a newbie to Lotus Notes, I know I am probably asking too much in one
    > shot. Please be patient to help me out if you can. Thanks in advance.
    >
    > With Lotus Notes 6.5.4 trial version, I have configured it to not to
    > connect to Domino Server. I use my own POP3 and SMTP (both are
    > localhost) for Internet mail transfer.
    >
    > First issue, after I create a memo/mail, it gets into the "Sent"
    > box immediately. Then verifying through replicator page, I find the
    > mail is held indefinitely in "Mail" folder of "Mail Router
    > Mailbox". Then I would need to manually click on "Send Outgoing
    > Mail" of Quickpick in order to complete the sending. How can I get
    > mail to be sent immediately when "Send" button is clicked? Note,
    > in my Internet location, I do set the "Transfer outgoing mail if"
    > of Mail tab to "0" messages pending already.
    >
    > Second issue, when receiving an Internet mail, I know the mail has
    > reached the local POP3 for the Lotus Notes client, but I would need to
    > manually click on "Receive Mail" of Quickpick in order to complete
    > the mail receiving and then press Refresh (F9) button to actually see
    > it in the Inbox.
    >
    > Regarding the second issue: in mymail.nsf, I created an agent as
    > following:
    >
    > //Agent name: ReceiveMail
    > Database := @DbName;
    > @Command([Replicator]);
    > @Command([ReplicatorSendReceiveMail]);
    > @Command([ReloadWindow])
    >
    > It appears to work from Action menu although I still need to hit
    > Refresh (F9) button to view the new mail. The real problem, when
    > executing the "agent.Open()" due to the mail arrival event in POP3
    > as following, I got the error message in catch block as "Object or
    > data is corrupted":
    >
    > LNNotesSession Session;
    > LNDatabase Db;
    > LNString DbTitle;
    > LNAgent agent;
    >
    > LNSetThrowAllErrors(TRUE);
    >
    > try
    > {
    > Session.Init();
    >
    > Session.GetDatabase("C:\\Mydata\\lotus\\notes\\data\\mail\\mymail.nsf",
    > &Db, ""); //using my own mail database
    >
    > Db.Open();
    > if( Db.AgentExists("RecieveHongMail") )
    > {
    > Db.GetAgent("RecieveHongMail", &agent);
    > agent.Open();
    > agent.Execute();
    > }
    > }
    > catch (LNSTATUS Lnerror)
    > {
    > char ErrorBuf[ERR_BUF_SIZE];
    > LNGetErrorMessage(Lnerror, ErrorBuf, ERR_BUF_SIZE);
    > cout << "Error: " << ErrorBuf << endl;
    > }
    >
    > Db.Close();
    > Session.Term();
    >
    > Then I try the similar agent in mynames.nsf with above C++ code;
    >
    > //RecieveMail2
    > @Command([Replicator]);
    > @Command([ReplicatorSendReceiveMail]);
    > @Command([ReloadWindow])
    >
    > Again the UI action works for the agent and I still needs to hit
    > Refresh (F9) button. This time, I got the "@Function is not valid in
    > this context" error for "agent.Execut()". Note it passes the
    > agent.Open() in this case.
    >
    > How can I fix the issues? As I am a newbie in Formula, LotusScript,
    > etc. I do not know how to switch into mail box view in mynames.nsf with
    > Formula. What is the equivalent Lotus Script code for the above agents?
    >




  3. Re: Lotus Send/Receive mail not done immediately

    It works with "1" instead of "0". Thanks a lot Tim!

    Do anyone know Java/Lotus Script equivalent of the formula above? As I
    can't figure out the reason for @Function error message yet (I do
    figure out the "Object or data is corrupted" issue which is due to 'Run
    on behalf of" setting was set to - LocalDomainServers; and now I have
    it set to blank. But the @Function error still remains), I wonder what
    would happen if I use LotusScript or Java for the agent.


  4. Re: Lotus Send/Receive mail not done immediately

    On 21 Sep 2005 07:07:48 -0700, hq4000@hotmail.com wrote:

    > As a newbie to Lotus Notes, I know I am probably asking too much in one
    > shot. Please be patient to help me out if you can. Thanks in advance.
    >
    > With Lotus Notes 6.5.4 trial version, I have configured it to not to
    > connect to Domino Server. I use my own POP3 and SMTP (both are
    > localhost) for Internet mail transfer.
    >
    > First issue, after I create a memo/mail, it gets into the "Sent"
    > box immediately. Then verifying through replicator page, I find the
    > mail is held indefinitely in "Mail" folder of "Mail Router
    > Mailbox". Then I would need to manually click on "Send Outgoing
    > Mail" of Quickpick in order to complete the sending. How can I get
    > mail to be sent immediately when "Send" button is clicked? Note,
    > in my Internet location, I do set the "Transfer outgoing mail if"
    > of Mail tab to "0" messages pending already.
    >
    > Second issue, when receiving an Internet mail, I know the mail has
    > reached the local POP3 for the Lotus Notes client, but I would need to
    > manually click on "Receive Mail" of Quickpick in order to complete
    > the mail receiving and then press Refresh (F9) button to actually see
    > it in the Inbox.
    >
    > Regarding the second issue: in mymail.nsf, I created an agent as
    > following:
    >
    > //Agent name: ReceiveMail
    > Database := @DbName;
    > @Command([Replicator]);
    > @Command([ReplicatorSendReceiveMail]);
    > @Command([ReloadWindow])
    >
    > It appears to work from Action menu although I still need to hit
    > Refresh (F9) button to view the new mail. The real problem, when
    > executing the "agent.Open()" due to the mail arrival event in POP3
    > as following, I got the error message in catch block as "Object or
    > data is corrupted":
    >
    > LNNotesSession Session;
    > LNDatabase Db;
    > LNString DbTitle;
    > LNAgent agent;
    >
    > LNSetThrowAllErrors(TRUE);
    >
    > try
    > {
    > Session.Init();
    >
    > Session.GetDatabase("C:\\Mydata\\lotus\\notes\\data\\mail\\mymail.nsf",
    > &Db, ""); //using my own mail database
    >
    > Db.Open();
    > if( Db.AgentExists("RecieveHongMail") )
    > {
    > Db.GetAgent("RecieveHongMail", &agent);
    > agent.Open();
    > agent.Execute();
    > }
    > }
    > catch (LNSTATUS Lnerror)
    > {
    > char ErrorBuf[ERR_BUF_SIZE];
    > LNGetErrorMessage(Lnerror, ErrorBuf, ERR_BUF_SIZE);
    > cout << "Error: " << ErrorBuf << endl;
    > }
    >
    > Db.Close();
    > Session.Term();
    >
    > Then I try the similar agent in mynames.nsf with above C++ code;
    >
    > //RecieveMail2
    > @Command([Replicator]);
    > @Command([ReplicatorSendReceiveMail]);
    > @Command([ReloadWindow])
    >
    > Again the UI action works for the agent and I still needs to hit
    > Refresh (F9) button. This time, I got the "@Function is not valid in
    > this context" error for "agent.Execut()". Note it passes the
    > agent.Open() in this case.
    >
    > How can I fix the issues? As I am a newbie in Formula, LotusScript,
    > etc. I do not know how to switch into mail box view in mynames.nsf with
    > Formula. What is the equivalent Lotus Script code for the above agents?



    The LS equivalent for the above agent is:


    Sub Initialize
    Dim s As New NotesSession
    Call s.CurrentDatabase.GetAgent( "RecieveHongMail" ).Run
    End Sub

  5. Re: Lotus Send/Receive mail not done immediately

    Sorry for the confusion. What I want to know is the LotusScript
    equivalent for at least the following:

    @Command([Replicator]);
    @Command([ReplicatorSendReceiveMail]);


    As I don't understand the @Function error still.


  6. Re: Lotus Send/Receive mail not done immediately

    The possible reason for the error in the java when you agent.open is I
    am not sure you have instantiated the agent.

    //You get the db , check it is open adn the agent exists but never
    instantiate the agent.

    Db.Open();
    if( Db.AgentExists("RecieveHongMail") )
    {
    // there should be an instantiation here somewhere .. like
    this
    Agent agent = Db.GetAgent("RecieveHongMail", &agent);
    agent.run();
    //Db.GetAgent("RecieveHongMail", &agent);
    // agent.Open();
    //agent.Execute();
    }
    }


+ Reply to Thread