Question: does port 25 still work (I mean, I thought port 25 was blocked now-a-days)? Good if it does, I guess.
I've been successfully using the code I posted for years - it's still in place, functioning. That said, it really depends upon your mail server - recommend one talks to their IT folks for the sendusing, smtpserver & smtpserverport configuration values (lines 52-54 in the code I posted).
This is what you get when you look at the html string that gets sent with the original suggestion.
Good gawd, yet another reason NOT to use outlook. That is horrendous, polluted sh@t.
Oh, I'm not questioning the code (I'm sure it works) but I was just questioning port 25. I know a lot of ISPs here, in the states, block 25 for client to server communications ('cutting down on spam" and all of that stuff). In the US, and/if I understand the scenario properly--doubtful--25 is only used now-a-days in between servers; client side communications are supposed to use TSL (587). If 25 works, great.
Yeah, that's outlook/html email for you; messy stuff.

You can change your settings to Plain text and get cleaner results.