Background]
Today, a friend asked me how to set the specified sender when the domino proxy sends an email and the recipient receives the email as admin? I personally wrote some code and found it feasible.
[Reference Code]
Sub initializeon error goto errhandledim ss as new notessessiondim dB as notesdatabasedim doc as notesdocumentset DB = ss. currentdatabaseset Doc = dB. createdocument () Doc. form = "memo" Doc. principal = "zhangsan12" Doc. sendto = "[email protected]" Doc. subject = "Email Subject" Doc. body = "email content" Call Doc. send (true) msgbox "email sent successfully! "Exit suberrhandle: msgbox ss. currentdatabase. filepath & "," & SS. currentagent. name & ", error:" & error () & ", ERL:" & CSTR (ERL () Exit subend sub
[Implementation result]
Note:
Principal: the user name assigned to the value, names. users who do not exist in NSF can also send messages. If they do not know whether it is related to server configuration, but do not pass in the email addresses of other systems, they must use this to make it worse.
Zookeeper