Comment accéder aux paramètres SMTP (offre e-mail pro)
... / Comment accéder aux param...
BMPCreated with Sketch.BMPZIPCreated with Sketch.ZIPXLSCreated with Sketch.XLSTXTCreated with Sketch.TXTPPTCreated with Sketch.PPTPNGCreated with Sketch.PNGPDFCreated with Sketch.PDFJPGCreated with Sketch.JPGGIFCreated with Sketch.GIFDOCCreated with Sketch.DOC Error Created with Sketch.
Question

Comment accéder aux paramètres SMTP (offre e-mail pro)

by
JeremyD31
Created on 2018-05-09 12:20:40 (edited on 2024-09-04 11:39:43) in Offre E-mail Pro

Bonjour,

je suis entrain de créer un site web avec la possibilité d'envoyer un email après une inscription. Pour ce faire je dois utiliser une librairie qui a besoin du paramètre SMTP pour fonctionner mais ça n'a pas l'air d'être disponible:

image


Est-il possible de le configurer quelque part ?

Merci


5 Replies ( Latest reply on 2024-11-13 20:36:45 by
JeremyD31
)

Bonjour @JeremyD31

As-tu essayé avec la fonction PHP **mail();** ?


besoin du paramètre SMTP pour fonctionner


Bonjour,

Voyez votre espace client, l'information doit s'y trouver.

C'est par exemple pro2.mail.ovh.net, port 587, sécurité STARTTLS

Merci pour les réponses.

Je n'utilise pas php (node js/nodemailer)


Sinon pour l'espace client j'ai ceci:




Dans l'onglet "domaine associé" j'ai :

le logo mx en vert configuré de manière automatique

le logo "srv" en rouge avec:


"Diagnostic SRV
Étape 1 sur 2
Votre domaine est hébergé chez OVH, vous pouvez configurer le champ SRV de votre domaine brainscoding.fr de la manière suivante

Champ SRV
Sous domaine : _autodiscover._tcp
Priorité : 0
Poids : 0
Port : 443
Cible : pro2.mail.ovh.net."


node js/nodemailer


Je n'utilise pas node js/nodemailer. Aussi je laisse @Fritz2cat finir de vous aider.


Est-il possible de le configurer quelque part ?


Utilisez les paramètres que je vous ai indiqués, ça fonctionne ?

pro2.mail.ovh.net, port 587, sécurité STARTTLS


et le login est l'adresse mail complète de votre boîte

En effet ça a fonctionné merci !

Si cela peut aider d'autre la config est la suivante:

const transporter = nodemailer.createTransport({
host: "pro2.mail.ovh.net",
port: 587,
secure: false,

auth: {
user: process.env.MAILER_USER,
pass: process.env.MAILER_PASSWORD,
},
});

le "secure" à false c'est par rapport au STARTTLS (documentation ici: https://nodemailer.com/smtp/)

Pour le moment c'est environnement de dev et cela fonctionne, en esperant que cela passe aussi sur la prod. Merci ! :)

```text


En effet ça a fonctionné merci !


Avec cette configuration il est probable que votre mot de passe se balade en clair sur le réseau. Ce n'est pas top.

Si vous voulez creuser plus loin: https://nodemailer.com/smtp/

TLS options

secure – if true the connection will use TLS when connecting to server. If false (the default) then TLS is used if server supports the STARTTLS extension. In most cases set this value to true if you are connecting to port 465. For port 587 or 25 keep it false
tls – defines additional node.js TLSSocket options to be passed to the socket constructor, eg. {rejectUnauthorized: true}.
tls.servername - is optional hostname for TLS validation if host was set to an IP address
ignoreTLS – if this is true and secure is false then TLS is not used even if the server supports STARTTLS extension
requireTLS – if this is true and secure is false then Nodemailer tries to use STARTTLS even if the server does not advertise support for it. If the connection can not be encrypted then message is not sent

Setting secure to false does not mean that you would not use an encrypted connection. Most SMTP servers allow connection upgrade via STARTTLS command but to use this you have to connect using plaintext first.

Si vous voulez jouer avec secure, et que ça ne fonctionne pas, utilisez le port 465 au lieu de 587. ```