# Opsætning af SMTP med Outlook

<p class="callout info">English version below</p>

Denne guide viser, hvordan I forbinder jeres website til Microsoft 365 via WP Mail SMTP.

Opsætningen sikrer, at mails fra websitet (fx kontaktformularer) bliver sendt korrekt og ikke ender i spam.

I skal logge ind med den mailkonto, der skal bruges som afsender. Det er den mailadresse, modtagere vil se, når de modtager mails fra websitet.

1. Gå til **WP Mail SMTP** i WordPress, og klik på **Settings**
    
      
    ![Screenshot 2026-03-17 at 11.18.30.png](https://docs.backuptrain.dk/uploads/images/gallery/2026-03/scaled-1680-/8jIRKUldk4DSsODH-screenshot-2026-03-17-at-11-18-30.png)
2. Scroll ned til bunden af siden, og klik på **Sign in with Microsoft**  
      
    ![image.png](https://docs.backuptrain.dk/uploads/images/gallery/2026-03/scaled-1680-/JT88vRZqnhvHhQr9-image.png)
3. Log ind med den konto, I ønsker websitet skal sende mails fra.  
    Det er denne mailadresse, der vil stå som afsender på mails fra websitet.
    
    Vi anbefaler, at I bruger en generel mailadresse, som egner sig som afsender – fx **kontakt@morningtrain.dk**
    
    ![image.png](https://docs.backuptrain.dk/uploads/images/gallery/2026-03/scaled-1680-/8YC4NEkovLjwCK9Y-image.png)
4. Der er stor sandsynlighed for, at WP Mail SMTP første gang skal godkendes i jeres Microsoft 365 / Outlook.  
    Du kan derfor blive mødt af tre forskellige scenarier:  
      
    ##### **Scenarie 1: Du bliver logget direkte ind**
    
    Hvis du blot bliver logget ind uden fejl, er alt i orden, og du kan gå videre til step 5.  
      
    ![Screenshot 2026-03-18 at 13.08.10.png](https://docs.backuptrain.dk/uploads/images/gallery/2026-03/scaled-1680-/qSPEa5sB6qqhiPrF-screenshot-2026-03-18-at-13-08-10.png)
    
    ##### **Scenarie 2: “Approval required”**
    
    Du bliver bedt om at anmode en administrator om adgang.
    
    Indtast en kort besked, og klik på **Request approval**.
    
      
    ![Screenshot 2026-03-18 at 13.03.46.png](https://docs.backuptrain.dk/uploads/images/gallery/2026-03/scaled-1680-/mQHPdb3THXu1u5CR-screenshot-2026-03-18-at-13-03-46.png)
    
    En administrator i jeres Microsoft 365 vil herefter modtage en anmodning og skal godkende adgangen.
    
    ![Screenshot 2026-03-18 at 13.04.18.png](https://docs.backuptrain.dk/uploads/images/gallery/2026-03/scaled-1680-/iY27DL0NSNSZAAYw-screenshot-2026-03-18-at-13-04-18.png)
    
      
    Når adgangen er godkendt, kan du logge ind igen med den ønskede konto.  
    Du skulle nu gerne komme igennem (som i scenarie 1).
    
    ##### **Scenarie 3: “Need admin approval”**
    
    I dette tilfælde kan du ikke selv anmode om adgang. Den nemmeste løsning er, at en administrator logger ind én gang via knappen **Sign in with that account** og godkender adgangen til WP Mail SMTP. Når det er gjort, kan du logge ind igen med den ønskede konto. Du skulle herefter komme igennem (som i scenarie 1).  
      
    ![image.png](https://docs.backuptrain.dk/uploads/images/gallery/2026-03/scaled-1680-/qJuQRjVjTsMcma39-image.png)
5. Når du er logget ind med den ønskede konto, vil du se en besked i stil med **“Connected as…”.** ![Screenshot 2026-03-18 at 13.52.58.png](https://docs.backuptrain.dk/uploads/images/gallery/2026-03/scaled-1680-/yq2g14BlRYPCJXtY-screenshot-2026-03-18-at-13-52-58.png)
    
      
    Det betyder, at jeres konto er tilknyttet 🎉

### Test af opsætning

For at sikre, at alt virker, kan du sende en testmail:

Gå til **WP Mail SMTP** i WordPress, og klik på **Tools**  
Indtast en mailadresse, og klik på **Send** ![Screenshot 2026-03-18 at 13.55.58.png](https://docs.backuptrain.dk/uploads/images/gallery/2026-03/scaled-1680-/VzmoLQ67UMWNYxM5-screenshot-2026-03-18-at-13-55-58.png)

Hvis det virker, ser du nu følgende **Success** besked, og du har modtaget en mail på den indtastede mailadresse.  
  
![image.png](https://docs.backuptrain.dk/uploads/images/gallery/2026-03/scaled-1680-/u230qdnScdWu6yn5-image.png)

Hvis det ikke virker, er I meget velkomne til at kontakte os.

---

## Setting up SMTP with Outlook

This guide shows you how to connect your website to Microsoft 365 via WP Mail SMTP.

The setup ensures that emails from the website (e.g. contact forms) are sent correctly and don't end up in spam.

You need to sign in with the email account that should be used as the sender. This is the email address recipients will see when they receive emails from the website.

1. Go to **WP Mail SMTP** in WordPress and click **Settings**
    
      
    ![Screenshot 2026-03-17 at 11.18.30.png](https://docs.backuptrain.dk/uploads/images/gallery/2026-03/scaled-1680-/8jIRKUldk4DSsODH-screenshot-2026-03-17-at-11-18-30.png)
2. Scroll down to the bottom of the page and click **Sign in with Microsoft**  
      
    ![image.png](https://docs.backuptrain.dk/uploads/images/gallery/2026-03/scaled-1680-/JT88vRZqnhvHhQr9-image.png)
3. Sign in with the account you want the website to send emails from.  
    This email address is the one that will appear as the sender on emails from the website.  
    We recommend using a general email address suitable as a sender - for example **contact@morningtrain.dk**
    
    ![image.png](https://docs.backuptrain.dk/uploads/images/gallery/2026-03/scaled-1680-/8YC4NEkovLjwCK9Y-image.png)
4. There's a strong chance that WP Mail SMTP will need to be approved in your Microsoft 365 / Outlook the first time.  
    You may therefore encounter three different scenarios:  
      
    ##### **Scenarie 1: You are signed in directly**
    
    If you're simply signed in without any errors, everything is fine and you can move on to step 5.
    
      
    ![Screenshot 2026-03-18 at 13.08.10.png](https://docs.backuptrain.dk/uploads/images/gallery/2026-03/scaled-1680-/qSPEa5sB6qqhiPrF-screenshot-2026-03-18-at-13-08-10.png)
    
    ##### **Scenario 2: "Approval required"**  
    
    
    You're asked to request access from an administrator.  
    Enter a short message and click **Request approval**.
    
      
    ![Screenshot 2026-03-18 at 13.03.46.png](https://docs.backuptrain.dk/uploads/images/gallery/2026-03/scaled-1680-/mQHPdb3THXu1u5CR-screenshot-2026-03-18-at-13-03-46.png)
    
    An administrator in your Microsoft 365 will then receive a request and must approve the access.
    
    ![Screenshot 2026-03-18 at 13.04.18.png](https://docs.backuptrain.dk/uploads/images/gallery/2026-03/scaled-1680-/iY27DL0NSNSZAAYw-screenshot-2026-03-18-at-13-04-18.png)
    
    Once access has been approved, you can sign in again with the desired account.  
    You should now get through (as in scenario 1).
    
    ##### **Scenario 3: "Need admin approval"**
    
    In this case you can't request access yourself. The easiest solution is for an administrator to sign in once via the **Sign in with that account** button and approve access for WP Mail SMTP. Once that's done, you can sign in again with the desired account. You should then get through (as in scenario 1).
    
      
      
    ![image.png](https://docs.backuptrain.dk/uploads/images/gallery/2026-03/scaled-1680-/qJuQRjVjTsMcma39-image.png)
5. Once you're signed in with the desired account, you'll see a message along the lines of **"Connected as…".** ![Screenshot 2026-03-18 at 13.52.58.png](https://docs.backuptrain.dk/uploads/images/gallery/2026-03/scaled-1680-/yq2g14BlRYPCJXtY-screenshot-2026-03-18-at-13-52-58.png)
    
      
    This means your account is connected 🎉

### Testing the setup

To make sure everything works, you can send a test email:

Go to **WP Mail SMTP** in WordPress and click **Tools**  
Enter an email address and click **Send**

  
![Screenshot 2026-03-18 at 13.55.58.png](https://docs.backuptrain.dk/uploads/images/gallery/2026-03/scaled-1680-/VzmoLQ67UMWNYxM5-screenshot-2026-03-18-at-13-55-58.png)

If it works, you'll now see the following **Success** message, and you'll have received an email at the address you entered.  
  
![image.png](https://docs.backuptrain.dk/uploads/images/gallery/2026-03/scaled-1680-/u230qdnScdWu6yn5-image.png)

If it doesn't work, you're very welcome to contact us.