Sending mail via code

Hi All,

Does anybody knows the way (if exists) to sending mail, requesting from a web application?

I’m writing some pages ASP for Intranet that should be send mail at certains events.

I know CDONTS do this… but I don’t know if it’s possible make with Notes…

Could you help me, please?

Thanks,

Alessandro.

Subject: Sending mail via code

Alessandro,There are a number of ways to send mail. In formula language, the @MailSend function could be used. In a WebQuerySave lotusscript agent you coud use the “Send” method of LotusScript “NotesDocument” class. You should look in your Notes Designer documentation at these two means for sending messages. Alternatively go to this URL: http://www-12.lotus.com/ldd/doc/domino_notes/6.5.1/help65_designer.nsf/Index?SearchView&Query=send%20OR%20method%20OR%20MailSend

  • Gene

Subject: Have you lost your mind, READ documentation??

Subject: Maybe this will help.

MailSend w/$$QuerySaveAgent (Web)

It is important to mention since store form in document does not work over the web, in order for the content in the mailed message to appear

in the recipient’s mail file, the fields in the form that is being mailed must have the same field names that exist in the memo form of the

recipient’s mail file. So the fields should be named: From, SendTo,

Subject, Body, etc… This allows the data in the mailed form to map to the

fields in the Memo form.

Another way to accomplish the MailSend is to use LotusScript and the $$QuerySaveAgent field. The LotusScript approach is to create an agent that is shared, triggered manually from the actions menu, and set to run on "Run

Once @Commands may be used". Include the LotusScript code below in the

agent. In the mailed form add a computed field named $$QuerySaveAgent. The formula for this computed field should be the name of the agent.

Sub Initialize

 Dim session As New NotesSession

 Dim db As NotesDatabase

 Dim doc As NotesDocument

 Dim sendto As String

 

 Set db=session.currentdatabase

 Set doc=session.documentcontext

 sendto=doc.SendTo(0)     

'//There is a field on the form called SendTo, where the web client can

specify the recipient.

 Call doc.save(True,False)

 Call doc.send(True,SendTo)    

'// The True argument of doc.send attaches the form to the doc. Disable

store form in doc at the form level and use this

'// argument to mail the form with the document.