Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SMTP and Lotus DOMINO

Status
Not open for further replies.

Harish77

Programmer
Dec 25, 2001
18
US
Dear All,

Need help. The scenario is given below

MACHINES LAYOUT: The deployment server machine where the SMTP is configured and ASP files are hosted) is connected to a Win NT Domain Controller . This domain Controller is connected to another Windows NT Server which runs the Lotus notes email server... All these machines are connected using a 48 point HUB... There are several other Windows NT Workstations and Windows NT servers in this network... One of such Windows NT Server is acting as a proxy server for internet connection.



MESSAGING SETUP: According to need, the deployment server has the SMTP configured. The ASP files are not able to shoot the mails to the Intranet email addresses. How to configure the SMTP to enable this email to run through freely using the mail ID generated through Lotus notes?

Please advice

Regards

Harry
 
so on your NT domain controller, you are running IIS ? are you using the IIS SMTP service ? If so, then create a new default local smtp domain, and give it the fqdn of your machine,
then create a new remote smtp domain,
'route domain' : fill in the email domain name (e.g. mydomain.com)
and select 'allow incoming mail to be relayed to this domain'


Now select 'Default SMTP Site, right click and choose properties'
go to the 'delivery' tab
fill in the domain name (mydomain.com) in 'Fully Qualified Domain name'
Smart host : [ip_address_of_your_remote_smtp_Server]
-> between [ ] !!!

restart smtp service and try again...



--------------------------------------------------------------------
How can I believe in God when just last week I got my tongue caught in the roller of an electric typewriter?
---------------------------------------------------------------------
I have not failed, I've just found 10,000 ways that don't work
---------------------------------
 
Dear Peter,

Can we use ASP to send mails to notes rather than i try smtp to send the mails ?? What Say?

Please help . iam meeting a deadline soon.

Harry
 
yes, you can use the IIS smtp server service on your webserver, and use some very simple asp code to send the emails via smtp, to your Domino server, and so on...

are you interested in the .asp code to send a mail ? --------------------------------------------------------------------
How can I believe in God when just last week I got my tongue caught in the roller of an electric typewriter?
---------------------------------------------------------------------
I have not failed, I've just found 10,000 ways that don't work
---------------------------------
 
Hi Peter,

Iam exactly looking for the ASP Page code. I have done some coding never seems to be working .

Please help

Thanx in advance

Harry
 
This should do the trick...

Code:
<%
'send email
dim bodytext
set objMail = CreateObject(&quot;CDONTS.NewMail&quot;)
objMail.from = &quot;webmaster@yourdomain.com&quot;
objMail.To = &quot;client@clientdomain.com&quot;
objMail.subject = &quot;Testmail&quot;
bodytext=&quot;This is a test &  vbCrLf
bodytext=bodytext & &quot;This is line 2&quot; 		  objMail.body=bodytext
objMail.Send
set objMail=nothing
%>
--------------------------------------------------------------------
How can I believe in God when just last week I got my tongue caught in the roller of an electric typewriter?
---------------------------------------------------------------------
If this post was helpfull, please click below to let me know !
 
Dear Mr. Peter,

Thank you for the code. But i know that code, I was asking you some code for sending mails from Active Server Pages to lotus notes using Notes.Notessession. I think you got my point. Using ASP page to look in to the notes db and send mail to that user db, thats it.

Regards

Harry
 
hmmm never tried it, but maybe this might put you in the right direction :
(it is written in vbscript)

Code:
Dim s 'As New NotesSession
Dim db 'As NotesDatabase
Dim v 'As NotesView
Dim vn 'As NotesViewNavigator
Dim e 'As NotesViewEntry
Dim doc 'As NotesDocument
Dim personName
Dim personValue
 
' == Create and initialise NotesSession
Set session = CreateObject(&quot;Lotus.NotesSession&quot;)
Call session.initialize
 
Set db = session.GetDatabase(&quot;&quot;, &quot;names.nsf&quot;)
Set v = db.GetView(&quot;People&quot;)
Set vn = v.CreateViewNav()
Set e = vn.GetFirstDocument()
 
'== Loop through documents
While Not (e Is Nothing)
 set doc = e.Document
 set personName = doc.GetFirstItem(&quot;FirstName&quot;)
 personValue =personName.Values
 msgbox personValue(0), , &quot;Persons FirstName&quot;
 Set e=vn.GetNextDocument(e)
Wend
--------------------------------------------------------------------
How can I believe in God when just last week I got my tongue caught in the roller of an electric typewriter?
---------------------------------------------------------------------
If this post was helpfull, please click below to let me know !
 
Public Sub ProcessLotusMail()
Dim conICI As New ADODB.Connection
Dim rsLotusPo As New ADODB.Recordset
Dim SQLGetMailsfromTbl$
Dim Connectionstr$
Dim Session As Object
Dim MailDoc As Object
Dim rTItem As Object
Dim TimeofficeDB As Object
'''Dim mObjAtt As Object

On Error GoTo errDesc:
Connectionstr = &quot;Driver={SQL Server}; Server=axonws; Database=ICI_TEST; UID=sa; PWD=axondb&quot;

conICI.Open Connectionstr

SQLGetMailsfromTbl = &quot;Select * from ICI_LotusPo&quot;

rsLotusPo_Open SQLGetMailsfromTbl, conICI, adOpenDynamic, adLockBatchOptimistic, adCmdText

If Not (rsLotusPo.EOF Or rsLotusPo.BOF) Then

Do Until rsLotusPo.EOF
'create notes session
Set Session = CreateObject(&quot;Notes.NOTESSESSION&quot;)
'getting the timeoffice database
Set TimeofficeDB = Session.GETDATABASE(&quot;HARRYSYS/Axondm&quot;, &quot;Mail\mharish.nsf&quot;)
Set MailDoc = TimeofficeDB.CREATEDOCUMENT
'doc type is memo
MailDoc.Form = &quot;Memo&quot;
MailDoc.sendto = rsLotusPo(&quot;IL_RecieverEMail&quot;)
MailDoc.CopyTo = &quot;Suresh&quot;

'mail send from timeoffice
MailDoc.principal = &quot;Harish&quot;
MailDoc.Subject = rsLotusPo(&quot;IL_MsgSubject&quot;)
Set rTItem = MailDoc.CREATERICHTEXTITEM(&quot;Body&quot;)
Call rTItem.APPENDTEXT(rsLotusPo(&quot;IL_MsgBody&quot;))
'for attachment
' Set mObjAtt = rTItem.EMBEDOBJECT(1454, &quot;&quot;, )
Call MailDoc.SEND(False)

Set rTItem = Nothing
Set MailDoc = Nothing
Set TimeofficeDB = Nothing
Set Session = Nothing

rsLotusPo.MoveNext
Loop

End If

Exit Sub

errDesc:
SendMail = Err.Number & &quot; - &quot; & Err.Description



End Sub


The above code iam using in VB . But the body is actually a html code. now the code is geeting refelecte as the HTML code it self whil i try to viee in notes client. Any idea how to solve this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top