Skip to Content
0

Email Authorisation problem to send an email from PowerBuilder

Nov 07, 2017 at 11:02 AM

53

avatar image
Former Member

Hi

I am using 11.2 version PB and I am using this code to send the email from Powerbuilder . Now some users doesnot require authentication and some users does.

Is it possible to send without checking Authentication from PB.11.2. Please can you let me know. How can I send email from program with authentication or without authentication depends the user setting in email config. Please can you let me know.

// -----------------------------------------------------------------------------

// SCRIPT: n_smtp.of_SendMail_Start

//

// PURPOSE: This function starts the sendmail session.

//

// RETURN: True = Success, False = Failure

//

// DATE PROG/ID DESCRIPTION OF CHANGE / REASON

// ---------- -------- -----------------------------------------------------

// 03/30/2005 RolandS Initial coding

// -----------------------------------------------------------------------------

Constant String REPLY_READY = "220"

String ls_reply, ls_msg

Integer li_rc

// initialize Winsock

of_Startup()

// connect to server

iui_socket = of_Connect(is_server, ii_port)

If iui_socket = 0 Then Return False

// receive response

of_Recv(iui_socket, ls_reply)

If Left(ls_reply, 3) <> REPLY_READY Then

this.of_LogError(iERROR, "Connect Failed: " + ls_reply)

Return False

End If

// start conversation with server

If ib_authenticate Then

If Not of_auth() Then

of_Close(iui_socket)

Return False

End If

Else

ls_msg = "HELO " + of_GetHostName() + CRLF

If Not of_SendMsg(ls_msg) Then

of_Close(iui_socket)

Return False

End If

End If

Return True

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers