Sending Email via Scripts

You can send emails from scripts on sites via an SMTP server or via Exim.

When sending emails using the PHP mail() function, the default mailbox is, where login is your username and server is your domain name. To specify a specific mailbox as the sender's address, in addition to the From header, pass the -f argument to the mail server in the mail function:

mail("addressee", " topic", " text", " headlines", "-f sender address")

You can find information on configuring and using PHP mai() here: PHP documentation.

When sending via SMTP, the following details are used:

  • username (the same as the e-mail),
  • password from the e-mail box,
  • server for sending e-mail,
  • port - 25 or 2525.

For programming languages (PHP, Python) there are libraries for sending emails via SMTP. For example PHPMailer.

If you still have questions, please create a ticket to technical support.