Send email(recent info)..
Long story short, I need to send emails from a patch, to different people(7 total currently) w/ different email in each email, my searches of the forums and the internet as a whole have lead to a bunch of either old info or info that isn't relevant(external apps and such). Please tell me this is possible and I didn't just spend a day and a half writing this app that won't work the way I intended it?
Cheers,
--zer0
Hi,
have a look at my external called [sadam.tcpClient]
from The sadam Library (see https://cycling74.com/forums/announce-the-sadam-library-version-2012-10-08 ). If you open the reference page, you'll see an example on how to connect to the SMTP server of GMail with it.
Cheers,
Ádám
Brilliant! gmail is the host I use. thank you so much for the fast reply!
Followed readme can't get the reference doc to load, object and help patch load fine, copied the xml files to the right place and modified the .xml files the way stated, any hint @ what I'm missing?
Hi,
maybe it was too fast. Actually, I never _tested_ sending a mail with the client, and now that I tried, I realized that GMail on port 587 will only accept secure connections with TLS encoding, which means that to actually use the patch, you'd need to implement TLS encoding for Max, which is a huge work. Therefore I would rather do one of the following three options:
(1) Try connecting to GMail on port 25. For some reason, this doesn't work on my machine, but since most ISPs (at least in Hungary) will block communication through port 25, I think I'm just being blocked by my ISP on that specific port. If your ISP doesn't block port 25, then you can simply connect to GMail on that port and use an unencrypted connection to send your SMTP commands.
(2) Find an SMTP server that lets you send e-mails in an unencrypted way on port 25 and use that SMTP server. Typically, your ISP will offer you a free SMTP service that is unencrypted and probably doesn't even need user authentication (since you're already on the network of the ISP).
(3) There are lots of SMTP servers for free that you can install on your local machine and that you can use to send e-mails. Although this might sound good, you might end up spending some time configuring the server itself, specially if you don't know too much about the proper configuration of SMTP servers (personally, I don't know too much about that kind of stuff).
If I were you, I'd probably go with the second option.
Cheers,
Ádám
Could you possibly post the gmail sample patch as I can't even get the ref docs to load so I can't see the patch you're talking about? (though I'd love to get the reference to work so I could learn how to use your other externals as well ;))
Hi,
in the meantime, I decided to create a patch that worked for me with my ISPs own SMTP server (naturally I removed every reference to my actual authentication info etc.) Hope this would help:
Cheers,
Ádám
Hi,
are you on Max 5 or Max 6? I heard that the way how refdocs work on Max 6 is different from the mechanism used by Max 5. Since I am using Max 5 and developing mainly for that platform, I can't tell whether the reference docs work on Max 6 or not (probably they won't). If you're on Max 5, then please pm me to sort out what went wrong.
Thanks,
Ádám
On my laptop I only have 6, so that's prob the case, I'm away from my desktop that has both 5 & 6 on it, I'll try it on 5 tomorrow and give you a ping back if I'm still having problems, but for now I'm guessing it's version mismatch. Thanks for the patch in the meantime, it is not only nicely commented, it's also laid out nicely. I'll give it a run tonight when I get home and can see if this works. Once again thanks for the fast responses.
Cheers,
--zer0
This week ended up getting busy and didn't get to play w/ this till tonight, I'm getting the error: response: 550 Outbound mail refused - no from/sender header [R0111001]
Using your patch still(haven't integrated it into my mess of code yet).
Any thoughts?
Hi,
sorry, I was a bit busy. Unfortunately I don't know too much about SMTP error codes, but just by reading the error description, it seems that the 'FROM' part of the header is missing. Could you confirm that in my example patch you have set up your real e-mail address in the 'MAIL FROM:' message box and that you actually clicked it after the 'AUTH PLAIN' message and before the 'RCPT TO:' message boxes? Also make sure that you get some response from the server (which should display in the Max window) after each click (and before clicking on the next message box). I don't really know how an SMTP server is expected to react if you send it a new command before processing the latest one sent by you, but to stay on the safe side, I would just wait one-by-one the processing of all commands.
Another debugging option would be to open a telnet session (see for example http://www.yuki-onna.co.uk/email/smtp.html ) and send a message with it using the same parameters as those that you use in the patch. If you fail to send the message using telnet, then the problem is not related to Max or my example patch, but rather to your SMTP server or the specific e-mail address that you're trying to reach.
HTH,
Ádám
Hi there sadam. Many thanks for your external libraries im a fan!
im having same issues trying to send email from Gmail to Gmail, it says to require TTSL I searched a lot but couldnt find some solution . Any help apreciated thanks!