You are not logged in.
Hi,
I’m currently working with mORMot's SendEmail function and encountering an issue when sending emails via SMTP. The email gets delivered successfully, but when the function attempts to execute the QUIT command to terminate the session, it returns a 500 Unrecognized command error.
I also tried connecting manually via an SMTP test tool, and the email was sent successfully without sending a QUIT command at the end. The exchange was as follows:
<< 220-youssef.genious.net ESMTP Exim 4.98.1 #2 Wed, 12 Mar 2025 10:27:51 퍍
<< 220-We do not authorize the use of this system to transport unsolicited,
<< 220 and/or bulk e-mail.
>> EHLO [172.31.12.132]
<< 250-youssef.genious.net Hello ec2-54-212-131-181.us-west-2.compute.amazonaws.com [54.212.121.163]
<< 250-SIZE 52428800
<< 250-LIMITS MAILMAX=1000 RCPTMAX=50000
<< 250-8BITMIME
<< 250-PIPELINING
<< 250-PIPECONNECT
<< 250-AUTH PLAIN LOGIN
<< 250-STARTTLS
<< 250 HELP
>> AUTH PLAIN AHNhbGFoQG9tbmZXR3b3Jrcy5v
<< 235 Authentication succeeded
>> MAIL FROM:< 'here is the email sender ' > SIZE=561
>> RCPT TO:<' here is the email recevier '>
<< 250 OK
<< 250 Accepted
>> DATA
<< 354 Enter message, ending with "." on a line by itself
[Email headers and body content]
>> .
<< 250 OK id=1tsJJY-000000006xW-2a10
sock.SockSend(Text);
Exec('.', '25');
Exec('QUIT', '22'); // this command gives me erreur : 500 unrecognazed command
result := ioresult = 0;
Last edited by salah eddine frigini (2025-03-12 11:46:40)
Offline
The QUIT command seems to be pretty much standard:
https://mailtrap.io/blog/smtp-commands-and-responses/
Offline