Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Testing SMTP email calls
Message
From
05/01/2024 06:54:12
 
 
To
05/01/2024 01:23:12
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
01687494
Message ID:
01687501
Views:
42
>Specifying the Exchange Online SMTP server when sending SMTP mail is what MS calls "Direct Send": https://learn.microsoft.com/en-us/exchange/mail-flow-best-practices/how-to-set-up-a-multifunction-device-or-application-to-send-email-using-microsoft-365-or-office-365#option-2-send-mail-directly-from-your-printer-or-application-to-microsoft-365-or-office-365-direct-send
>In practice, I've found this works only if the IP address of the sender is in the recipient's DNS SPF record (the article claims this is optional). The SPF record defines addresses which are allowed to send mail on behalf of the domain.
>For example, suppose:
>- The public IPv4 address of the site you're sending from is 123.123.123.123
>- You're trying to use SMTP to send an e-mail to someone@xyz.com, where xyz.com's mail is hosted on Exchange Online
>This will work only if the IPv4 address 123.123.123.123 is included in the DNS SPF record for the domain xyz.com. ISTR the "From" address must also be in the recipient's domain, even if it isn't a real address or mailbox e.g. the "From" address must be something like MyApplication@xyz.com.
>If you can meet these conditions, it "just works". No authentication is needed.
>Note that if a sysadmin updates a DNS SPF record, the changes may take an hour or longer to propagate across the internet and come into effect.
>You may find that your client's site already meets the SPF record requirement, but your home or office public IP address does not. This would cause your tests from your own site to fail, but work fine at the client site.
>As you've already found, you can work around these requirements by specifying an SMTP server other than Exchange Online. Back when POP3/SMTP mail was king, everyone's ISP provided an SMTP server for use with their customers' outgoing mail. Many ISPs no longer offer an SMTP server, so customers have to look elsewhere.

Thanks. For now, I'm just trying to figure out why I can't get sending email to work through this test SMTP server. Seems to be a configuration issue on my side, NOT the code I'm using.

Tamar
Previous
Reply
Map
View

Click here to load this message in the networking platform