# \*WEB/TESTEMAIL: Test Email Utility

> Source: https://manual.pvxplus.com/web-utilities/testemail

## Description

The **\*web/testemail** utility makes it easier and more convenient to work with the **\*[WEB/EMAIL](https://manual.pvxplus.com/web-utilities/email-utility/overview)** utility. Using only a few options, it allows you to send a "test" email and will output the **\*web/email** command needed to send an email. It will also display helpful error messages to assist you in quickly resolving any issues.

*(The \*web/testemail utility was added in PxPlus 2016.)  
(OAuth2 support for the \*web/testemail utility was added in PxPlus 2025.)*

## Calling Sequence

**CALL "\*web/testemail**;*test\_name*",*from$*,*smtp_server$*,*username$*,*password_or_accesstoken$*,*to$*

***Where:***

|  |  |
| --- | --- |
| *test_name* | ***(Input)*** One of the following options can be used:<br>\|  \|  \|<br>\| --- \| --- \|<br>\| **TEST** \| Uses the default SMTP Port 25. It will connect unencrypted or encrypted via STARTTLS, depending on the SMTP server. \|<br>\| **SSL_TEST** \| Enables SSL and uses the default SSL/SMTP Port 465. It will connect encrypted via SSL. \|<br>\| **STARTTLS_TEST** \| Uses the default STARTTLS/SMTP Port 587. It will connect encrypted via STARTTLS. \|<br>\| **OAUTH_SSL_TEST** \| Uses OAuth2 authentication, enables SSL and uses the default SSL/SMTP Port 465. It will connect encrypted via SSL. \|<br>\| **OAUTH_STARTTLS_TEST** \| Uses OAuth2 authentication and uses the default STARTTLS/SMTP Port 587. It will connect encrypted via STARTTLS. \|<br>*(OAUTH_SSL_TEST and OAUTH_STARTTLS_TEST were added in PxPlus 2025.)* |
| *from$* | ***(Input)*** Address to be used in the mail header to indicate who is sending the mail. (Only one address is allowed.) |
| *smtp_server$* | ***(Input)*** SMTP Server Name or IP address to be used to send the email.<br>It is also possible to override the default Port defined by *test_name* and set it here by appending a semi-colon and the Port Number to use. |
| *username$* | ***(Input)*** Your user name for the SMTP server, usually your email address. |
| *password_or_accesstoken$* | ***(Input)*** Your password for the SMTP server if you are not using one of the OAuth test types. If you are using an OAuth test type, this is the OAuth2 access token.<br>*(Support for passing in a valid OAuth2 access token was added in PxPlus 2025.)* |
| *to$* | ***(Input)*** Address(es) to whom to send the mail (one or more). |

## Example

The following **CALL** will send this sample email to *test@yourserver.com* from *test@myserver.ca*:

Subject: "Test Please Ignore"

Message: "Hi this is a test from PxPlus

Hello World"

```
call "*web/testemail;TEST","test@myserver.ca","smtp.myserver.ca","test@myserver.ca","mypassword",test@yourserver.com
```

## See Also

**[\*WEB/EMAIL Utility](https://manual.pvxplus.com/web-utilities/email-utility/overview)  
[\*WEB/SMTP Utility](https://manual.pvxplus.com/web-utilities/smtp-utility/overview)  
[\*WEB/POP3 Email Retrieval Utility](https://manual.pvxplus.com/web-utilities/pop3-email-retrieval)**
