Sending emails from a site or an application in the CLOUD

You can send emails from a site, application or webservice deployed on a CLOUD platform.

An SMTP server is available on each platform for PC SOFT applications. It allows you to send emails from your sites, applications and webservices, via the Email WLanguage functions. This server is accessible via the localhost address without having to specify any user or password.

Caution, the localhost SMTP server of each platform cannot be customized. It is therefore not suitable for emailings. 

You can also use your usual SMTP server (Orange, Google ...) in order to store the outgoing messages. The standard ports 25, 465, 587 are opened by default on the platform.

For example, the code below is used to send an email from a PCSCLOUD platform by using the SMTP server of gmail. This is used to send the message with a gmail account in sender and to store the message in the outgoing elements of the gmail server.

gSMTPSession is EmailSMTPSession

gSMTPSession..ServerAddress = "localhost"

gSMTPSession..Name = ""

gSMTPSession..Password = ""

gSMTPSession..Port = 25

gSMTPSession..Option = emailOptionDefault




MyMessage is Email

MyMessage..Sender = ""

MyMessage..SenderAddress = ""


Add(MyMessage..Recipient, "")

MyMessage..Subject = "Test sent from "+NetIPAddress()

MyMessage..Message = MyMessage..Subject


EmailSendMessage(gSMTPSession, MyMessage)