# Without the Plug-in

1. Open the **„functions.php”** file in your WordPress template.
2. Adjust the code below to your integration credentials and email settings and then paste it into the file.

```
add_action(’phpmailer_init’,’send_smtp_email’);
function send_smtp_email( $phpmailer )
{
 
        	// Information that we are sending via SMTP
 
         	$phpmailer->isSMTP();
 
        	// SMTP server name
 
        	$phpmailer->Host = „smtp.emaillabs.net.pl”;
 
       	        // SMTP authentication (true/false)
 
        	$phpmailer->SMTPAuth = true;
 
      	        // SMTP port number – 25 (no encryption),
 
                //587 (tls encryption)12          $phpmailer->Port = „587”;
 
     	        // EmailLabs smtp account name
 
     	       $phpmailer->Username = „ACCOUNT NAME”;
 
     	        // EmailLabs smtp account password
 
      	        $phpmailer->Password = „PASSWORD”;
 
     	        // Connection encryption – tls
 
                // or do not call the method
 
                $phpmailer->SMTPSecure = „tls”;
 
    	        $phpmailer->From = „Your email address”;
 }
```

In the last step, try sending a test message to ensure that integration was done correctly.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.emaillabs.io/en/cloud-based-smtp/smtp-integrations/cloud-smtp-for-wordpress/without-the-plug-in.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
