Mail.Box sending

Hi All

I have a script that is using the below and as you can see sending emails via mail.box

Is there a way that I can directly send via an external mail SMTP server (and not using mail.box) and how would I do that ?

Any help / pointers will be appreciated

==========================================

Set uidoc = workspace.CurrentDocument
Dim Subject As String, SendTo As String
Dim Sender As String, SenderN As String
Sender = "Replacement Report <johndoe@johndoe.com>"
SenderN = "Replacement Report <john Does>"
subject = "Replacement"
SendTo = "johny@johny.com"
Dim DBmbox As New NotesDatabase("server", "mail.box")
Dim mail As New NotesDocument( DBmbox )
s.ConvertMIME = False ' Do not convert MIME to rich text
Dim body As NotesMIMEEntity
Dim header As NotesMIMEHeader
Dim stream As NotesStream
Dim child As NotesMIMEEntity
Set stream = s.CreateStream
Set body = mail.CreateMIMEEntity
Set header = body.CreateHeader({MIME-Version})
Call header.SetHeaderVal("1.0")
Set header = body.CreateHeader("Content-Type")

==================================

It's a lot of work creating an SMTP mail client. Why?

Not creating a SMTP mail client. Just sending the mail via an external SMTP mail server . For example ... our mails are hosted on Azure and we could use the SMTP mail server and send it. Is there a way to route your mail via lotusscript through an external smtp server

What you want to do IS an SMTP mail client. To that correctly you need to implement the SMTP protocol. Not feasible in Lotusscript. Much easier to drop a document in mail.box...

No need to code anything - all notes clients have a built in SMTP mail client since decades (at least since R4).

Preparation (one time):

Open your personal address book and create two documents:

a) A location document with the setting for outbound mail handling "direct to internet" on the mail tab (in older notes releases there was already a location doc with name "Internet" with this setting). If you want to use an other mail database then your regular domino-db - here is the place to put the file name in. You have to put the mail address you want to use as "from"-address on the first tab.

b) An account document with the credentials you want to use, smtp servers address, port and security settings.

Optional: if you want to receive mails via pop/imap as well you need a pop/imap account doc. You should restrict your account documents to the location created in step a), otherwise mails could show up in wrong mail-dbs.

Usage:

Every time you want to send a mail via smtp you switch the location to "Internet" or whatever you named it (lower right corner of your notes client), write and send your mail and after this you switch back to your regulary used location.

Possible Problems:

If you have trouble sending for the first time and you use ssl - make sure that your notes client has the internet site you are connecting to cross certified.

Make sure your firewall doesn't block smtp traffic.

That's all, no script, no mail.box, no magic ;)

Hello Shafi,

As Carsten explained Notes has inbuilt functionality to configure as SMTP client to send email. You can refer the below link as an example how Gmail account is configured on Notes via POP3/SMTP.

How to Configure Gmail Account in Notes Client

https://support.hcl-software.com/csm?id=kb_article&sysparm_article=KB0079471

Thank You.

Regards

Shrikant J.