Difference between revisions of "MAILOPEN()"

From Lianjapedia
Jump to: navigation, search
m (1 revision)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Function to connect to the specified mail server
 
Function to connect to the specified mail server
 
  
 
==Syntax==
 
==Syntax==
 
MAILOPEN(<expC1>, <expC2>, <expC3> [, <expC4>])
 
MAILOPEN(<expC1>, <expC2>, <expC3> [, <expC4>])
 
  
 
==See Also==
 
==See Also==
 
[[CLOSEMAIL()]], [[COUNTMAIL()]], [[DELETEMAIL()]], [[MAILATTACH()]], [[MAILCLOSE()]], [[MAILCOUNT()]], [[MAILDELETE()]], [[MAILERROR()]], [[MAILHEADER()]], [[MAILNODENAME()]], [[MAILREAD()]], [[MAILSAVEAS()]], [[MAILSEND()]], [[MAILUSERNAME()]], [[OPENMAIL()]], [[READMAIL()]], [[SENDMAIL()]]
 
[[CLOSEMAIL()]], [[COUNTMAIL()]], [[DELETEMAIL()]], [[MAILATTACH()]], [[MAILCLOSE()]], [[MAILCOUNT()]], [[MAILDELETE()]], [[MAILERROR()]], [[MAILHEADER()]], [[MAILNODENAME()]], [[MAILREAD()]], [[MAILSAVEAS()]], [[MAILSEND()]], [[MAILUSERNAME()]], [[OPENMAIL()]], [[READMAIL()]], [[SENDMAIL()]]
 
  
 
==Description==
 
==Description==
 
The MAILOPEN() function is used to connect to the specified mail server.  The mail type POP3 should be used for reading mail, and SMTP used for sending mail.
 
The MAILOPEN() function is used to connect to the specified mail server.  The mail type POP3 should be used for reading mail, and SMTP used for sending mail.
 
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 27: Line 23:
 
|-
 
|-
 
|}
 
|}
 
  
 
If successful the MAILOPEN() will return .T., otherwise .F..  The MAILERROR() function can be used to return the error message if the MAILOPEN() fails.
 
If successful the MAILOPEN() will return .T., otherwise .F..  The MAILERROR() function can be used to return the error message if the MAILOPEN() fails.
 
  
 
==Example==
 
==Example==
Line 49: Line 43:
 
</code>
 
</code>
  
 
==Products==
 
Recital Server, Recital
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
[[Category:Mail]]
 
 
[[Category:Mail Functions]]
 
[[Category:Mail Functions]]

Revision as of 09:24, 7 December 2012

Purpose

Function to connect to the specified mail server

Syntax

MAILOPEN(<expC1>, <expC2>, <expC3> [, <expC4>])

See Also

CLOSEMAIL(), COUNTMAIL(), DELETEMAIL(), MAILATTACH(), MAILCLOSE(), MAILCOUNT(), MAILDELETE(), MAILERROR(), MAILHEADER(), MAILNODENAME(), MAILREAD(), MAILSAVEAS(), MAILSEND(), MAILUSERNAME(), OPENMAIL(), READMAIL(), SENDMAIL()

Description

The MAILOPEN() function is used to connect to the specified mail server. The mail type POP3 should be used for reading mail, and SMTP used for sending mail.

Parameters Required Default Description
<expC1> Yes None The node name or IP address of the mail server
<expC2> Yes None The user name with which to connect to the mail server
<expC3> Yes None The password for the user name
<expC4> No POP3 The mail protocol type. POP3 and SMTP are the currently supported protocols.

If successful the MAILOPEN() will return .T., otherwise .F.. The MAILERROR() function can be used to return the error message if the MAILOPEN() fails.

Example

// Open POP3 for reading mail
m_open = mailopen("mailserver.company.com", "username", "password", "POP3")
if not m_open
    dialog box mailerror()
    endif
mailclose()
 
// Open SMTP for sending
m_open = mailopen("mailserver.company.com","username","password", "SMTP")
if not m_open
    dialog box mailerror()
    endif
mailclose()