Solved

Server Agent  not sending email successfully

Posted on 2004-09-07
15
880 Views
Last Modified: 2013-12-18
Hi,

I've a webform, which has some fields and one among them is originator email address (origiemail).

This is what happens: when a user submits a requests via the web, the web query save agent will run an agent and sends an email to
doc.origemail(0) saying that the request is submitted successfully.

Now, this request (record) will come and sit in a view. Every 10 minutes I've another scheduled agent that processes this record.
After successfull processing, it sends an email to doc.origemail(0) saying that the request is processed successfully.

However, the second email part is not working. It sends email to doc.origemail(0). But the email is returned back saying the following:

"Error transferring to coregate2.INTERWAN.Companyname.COM; Invalid Internet address specified. Invalid Internet address specified"

However, the email address is a valid address. If i manually send an email to this address from my inbox, it works fine.

Please advise,
thanks
Sri
0
Comment
Question by:sridevi911
  • 5
  • 4
  • 2
  • +3
15 Comments
 
LVL 31

Expert Comment

by:qwaletee
ID: 11998030
The internet address being referred is the relay server IP address.  Change it to a host name.
0
 

Author Comment

by:sridevi911
ID: 11998039
please be advised, the first email is being sent correctly to the doc.origemail(0).

the second email is bouncing back when the email is sent to the same address doc.origemail(0).

0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 11998051
How did you specify the addresses? What is in the Notes.log database?
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 11998090
Looks like some configuration error...

Make sure the Domain docs in both the server (one running web server and the agent process) are converting the address properly (look under conversions section/tab)

~Hemanth
0
 

Author Comment

by:sridevi911
ID: 11998158
Qwaletee, how do i change it to host name.

sjef,
for example if the user enters hisname@yahoo.com in the origemail field in the form and clicks on submit then,
the first web query save agent sends it successfully. here is the code for that.

Set doc3 = New NotesDocument(db)
doc3.form = "Memo"
doc3.SendTo = doc.Origemail(0)
doc3.CopyTo = EDImail

doc3.Subject = "Portal Adds & Deletes Request # " & doc.txtFormNumber(0) & " for " & doc.ConID(0) & " is SUBMITTED successfully."
Line1= "You are receiving this email because you are the Originator of this request. "  & Chr$(10)
Set rtitem = New notesRichTextItem(doc3,"Body")
Call rtitem.appendText(Line1)
Call doc3.send ( True )


Now this request sits in the view. When the scheduled agent runs, it process all what it has to and sends another email exactly using the same code above.
but the subject says PROCESSED successfully.

That is when I'm getting this message bounced back to our server... All i get is this message:
Error transferring to coregate2.INTERWAN.companyname.COM; Invalid Internet address specified. Invalid Internet address specified.

0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 11998372
Very strange. And you are absolutely sure that there are no differences in the code, and that Origemail contains the right value? Can you run the second agent manually? Does it then give the same error? What happens if you enable the debugger and run the agent manually, what's the situation just before the Send?
0
 

Author Comment

by:sridevi911
ID: 11999559
if i run it manually it runs fine. In both the agents above, i'm using run on behalf of option.

the email id i used in the run on behalf of is a mail-in database.
So it is my understanding that mail-in databases cannot send emails when you run a server side agent which has the mail-in database email ID in the run on behalf of.

Again if this is the case i wonder how did the first one worked? the first agent (web query save agent which has the subject: submitted successfully)
also has the email ID of the mail-in database. This one works fine... but the second scheduled agent is the one that is not.

0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 11999636
Does the user "on behalf of" whom the agent runs have sufficient rights to run agents? What's the Domino version of your server? If R6, what security level is set in the properties? What happens if you remove the "on behalf of", does it work then?
0
 

Author Comment

by:sridevi911
ID: 11999972
version is r6. i do not know the security level as it is done by the admin. also if i remove the on  behalf of, it works fine. but the email is being sent as if i'm sending it as i signed the agent.
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 12001017
Use the mailDoc.Principal field to set the senders name.
Otherwise will all restrictions prohibit the run of your Agent for proviledged access.

0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 12004042
The security level can be set in the Agent's properties itself, since R6. Anyway, as Zvonko says, your Agent will probably never run on behalf of someone successfully this way. Use the Principal field.
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 12008578
Once more, this is not a problem with the addres on the e-mail.  It is a known problem with sending messages from an agent, where the destination SMTP server (the first SMTP server after leaving the Domino mail system) is specified to Domino as an IP address.  Don't ask me WHY this is a problem, it just is.  This can occur when you specify a relay host on an SMTP domain or a server configuration document or an SMTP connection document.
0
 

Author Comment

by:sridevi911
ID: 12009267
If i use the principal field it is sending the email successfully , however, if the doc.Origemail  is an internal company user then it is working fine.

otherwise if it is an external user it is sending an email as if I'm sending it (since i'm the signer of the agent).  

The security level of this agent is 2 = Allow Restricted Operations.

0
 
LVL 63

Expert Comment

by:Zvonko
ID: 12009358
So when user do not have the permission to execute Agents with Restricted operations, then your agent will not even start when set to run on behalf of their rights.

You HAVE TO redesign the agent to run with aithorised rights and use users sender address. There are several pitfals with the Principal address.
Add your mail domain after the user name.
Like this:

doc3.Principal = session.EffecitiveUsername & "@yourNotesDomain"

Another way is to enter users Internet address as Principal.


0
 
LVL 2

Accepted Solution

by:
kalios earned 100 total points
ID: 12018947
sridevi, i feel the best way to this... ask your admin to create a generic group ID (not a mail-in database id). then sign all your agents with that id. you can name that id to what ever name you want to. if you use a mail-in database id, you cannot send emails successfully to internet addresses.

in this way you need not use any principal fields.

check it out.
kalios
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now