Hello....
-- I am starting to switch over from using EMan to using the VAST SMTP EMail framework, and it appears to be very powerful and easy to use. I have already proven it works in situations that EMan was never able to handle. I have already added my own framework around it, to permit sending HTML, and using blind carbon copy. I would like to add the ability to include attachments as well. I know this is generally just a matter of adding the appropriate headers, and I do not expect to have any problems doing that. But before I reinvent the wheel, I thought I'd ask if anyone else has already done that. I am specifically looking to use SMTP. Any assistance is greatly appreciated.... Best Regards, Julian You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/96090a5c-15ad-4589-8d96-31e12357c3eco%40googlegroups.com. |
We used to use TobSockets (http://www.totallyobjects.com/Sockset.htm) for composing and sending mails with attachments. Now we use the smtp classes from 9.2.0 and some fixes from 9.2.1 to send mails. We still compose the (multipart) mail bodies with the code from TobSockets. Hope this helps. Adriaan. You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/b6c71bc8-3cbe-48d6-898e-fa87f93bdd22o%40googlegroups.com. |
Thanks, Adriaan.
-- I have also used TobSockets before. I appreciate the reply.... Regards, Julian On Thursday, June 11, 2020 at 3:46:24 PM UTC-4, Adriaan van Os wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/23d5e0fb-36ab-48cb-b5c9-73332764fdf3o%40googlegroups.com. |
In reply to this post by rjuli...@gmail.com
Julian, VAST 9.2 indeed makes SMTP and IMAP so easy and has a wonderful API compared to the "swamp" we had in SST before that. Instantiations is making such great progress on so many edges of VAST. I am about to help a customer migrate from VAST 6.02 and am eager to see both their eyes when they touch 9.2.2. for the first time and the flash from the past when I touch 6.02 again ;-) I did something that comes close to a port of MIMEMailApp from Pharo 6 or seven a bit more than a year ago. It is far from providing a nice API for assembling and parsing mail messages, but it is a start. I also fixed a few things that didn't work in te original implementation and removed some Pharo specific classes/prerequisites. At the sime time I introduced some dependencies from Seaside/Grease, e.g. for MIME types, so this is not something that will work out of the box. It does send a few dozen mixed html/plain text mails with attachments every day in our Kontolino servers, so I guess it is a good starting point. It's not code I am proud of, nor is the API very good so I don't think this is what assembling mail messages in VAST should look like in the future. But it is a starting point. I didn't dare pushing it to VASTGooedies, so I am attaching it here. I hope it helps. Please let me know if you find errors. Maybe this could be one of the early additions to the new Community hub on Github ? Joachim P.S.: I am looking for reliable ways of finding out whether a mail reached its recipient, or better: to find out which original message an "undelivered" mail belongs to. We need to know who didn't receive their invoices, for example. So if you have links, book or article suggestions, please feel free to share...
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/3486d7c3-fe9d-41c6-b543-aa6e29cb5427o%40googlegroups.com. MIMEMailApp.app (34K) Download Attachment |
Hello, Joachim.
-- Nice to hear from you... I think of those days drinking Mirto in Sardenia quite a bit, lately!!! I greatly appreciate you taking the time to respond, and send me your code. As it happens, I actually completed my own solution last night. I can now create an EMail, set it as HTML or not, attach any number of files, choose whether the EMail should be base64 encoded or not, and select both CC and BCC options. So....thank you!! I'm afraid I just ended up finishing quicker than I expected. You are right...this new framework is really nice. As for the CC and BCC stuff.... First of all it is critical to keep any BCC information out of the headers. I learned that the hard way, some years ago, when I discovered that GMAIL can show all of the headers...and thereby display the BCC list. So, my solution, is that I have a bcc and cc instance variables in my EMailMessage class (names simplified for illustration). When I format the headers, to send at the DATA step, I do the following: ( self carbonCopy notNilOrEmpty ) ifTrue: [ aStream nextPutAll: 'cc: '. self carbonCopy doWithIndex: [ :address :index | ( index > 1 ) ifTrue: [ aStream nextPutAll: '; ' ]. aStream nextPutAll: address. ]. aStream cr. ]. I do not add anything to do with the bcc list into this DATA step. Then, when I actually send the message, I use the following: sstSmtpClient sendMail: (anEMailMessage formattedMessage) from: self senderName to: anEMailMessage allRecipients where #allRecipients is | list | list := OrderedCollection new. ( self recipientAddress notNilOrBlankString ) ifTrue: [ list add: self recipientAddress ]. ( self carbonCopy notNilOrEmpty ) ifTrue: [ list addAll: self carbonCopy ]. ( self blindCopy notNilOrEmpty ) ifTrue: [ list addAll: self blindCopy ]. ^list I hope you find that useful! Thanks again!!!! Julian On Friday, June 12, 2020 at 12:12:46 AM UTC-4, Joachim Tuchel wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/09e9dd52-0426-4585-a61f-50765d64b6a7o%40googlegroups.com. |
Hi guys, It's great to see everybody helping each other. Now: * Adriaan said they use TobSockets to compose multipart. * Joachim said he uses a port of MIMEMailApp * Julian just finished his own solution I noticed Joachim quote "Maybe this could be one of the early additions to the new Community hub on Github ?" and I couldn't agree more :) I think it would be a nice addition and we can also document the project (add some example, some documentation, etc.). If you give me an ENVY dat file and some instructions to test it, then I can help with the Tonel export and I can submit a first draft into Github. Best, On Fri, Jun 12, 2020 at 3:07 PM Julian Ford <[hidden email]> wrote:
Mariano Martinez Peck Software Engineer, Instantiations Inc. Email: [hidden email] Twitter: https://twitter.com/MartinezPeck Blog: https://marianopeck.wordpress.com/You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAOUkibGiTbsRFEAeuVv0C4YF-mt6LoQLX_%2B-7OrpMbjsJaVzSQ%40mail.gmail.com. |
Administrator
|
In reply to this post by rjuli...@gmail.com
On Friday, June 12, 2020 at 11:07:14 AM UTC-7, Julian Ford wrote:
--
Hi Julian, I want to pass on some design thoughts, inspired by a lesson I learned waaay back in '89. Your use case may be sufficiently different that they don't apply, but in general, they will if you go to use the emailing code for another purpose later. 1) Get rid of all the conditional logic. 2) Model the email message protocol not the subset you use today. 3) Test for empty collections only when it matters. (it often doesn't / rarely does) Specifically, model the existence of 0 or more (primary) recipients, 0 or more carbon copy recipients, and 0 or more blind copy recipients. Don't model a single primary recipient when an email can be addressed to multiple people. The step function from 1 to many is huge, so start with having it right. And initialize all three collections to an empty collection. Then just use #primaryRecipients, #carbonCopyRecipients, and #blindRecipients knowing they will do exactly what you need. You will find use for a method like #writeHeader:list: convenient for both the To header and the CC header. And probably some others.
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/a84ef38f-68ae-43c0-b737-9559c13edbc9o%40googlegroups.com. |
In reply to this post by Mariano Martinez Peck-2
Hi All,
This is really cool work. I would be willing to jump in and help on this, as well! - Seth On Friday, June 12, 2020 at 3:33:50 PM UTC-4 Mariano Martinez Peck wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/7452b2c5-6a90-403d-8dd4-15b9670fb267n%40googlegroups.com. |
In reply to this post by Richard Sargent
Hello, Richard.
-- Thank you for the design suggestions. You are right that I did tend to limit my vision on this to my current need. For example, there can never be more than one recipient in my domain. The reason I put in conditional logic, is that I was assuming a CC header must not appear in the DATA segment, if there is no one being copied. I agree completely, though, that polymorphic behaviour is far better than using conditional logic. Mostly, what I have right now, was just a proof of concept. I have hundreds of users, who are suddenly trying to use EMail from my application (even though I introduced it about 10 years ago!), because of the current restrictions. With that, I had run into a few users, whose authentication required OAUTH, and EMan (which worked quite well for all of this time) did not support it. I considered extending EMan, or just finally making the break, and going with the new VAST SstSmtpClient stuff. I have everything working now, but will almost certainly spend some time smoothing out the rough edges. Thanks for taking the time to respond.... Julian On Friday, June 12, 2020 at 3:38:44 PM UTC-4, Richard Sargent wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/a477cfff-5f13-439d-93c3-05ea0fe5fa40o%40googlegroups.com. |
In reply to this post by Seth Berman
Hey, Seth!
-- I am happy to share what I have done...as long as everyone understands that I am NO SMTP guru by any stretch...and that I was looking for a quick and very targetted approach (that is the disclaimer so that no one looks at my code and rolls their eyes!). Having you help would be great....you could end up offering it to others, like your famous Tetris application! (LOL....sorry to everyone else.....inside joke). Stay safe and healthy.... Julian On Friday, June 12, 2020 at 3:41:10 PM UTC-4, Seth Berman wrote: Hi All, You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/5954022b-ba7d-4ef4-9e0a-cbc0ed80e8cbo%40googlegroups.com. |
In reply to this post by Mariano Martinez Peck-2
Great idea, Mariano!
-- On Friday, June 12, 2020 at 3:33:50 PM UTC-4, Mariano Martinez Peck wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/7c7921b4-4fc6-4e92-8ad6-5d8ab55fec01o%40googlegroups.com. |
Administrator
|
In reply to this post by rjuli...@gmail.com
On Friday, June 12, 2020 at 3:00:02 PM UTC-7, Julian Ford wrote:
That's is why you might have #writeHeader:list: and #writeMandatoryHeader:list:implementations. The former would be conditional on the list not being empty and would call the latter. The latter being unconditional, for those cases where you could have or need the header even if there is no value. (Not that I know of one.)
Understood. Expediency is sometimes the most crucial consideration.
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/d70c8cfb-584b-4839-877f-8e6d64c6b7eao%40googlegroups.com. |
In reply to this post by rjuli...@gmail.com
"I am happy to share what I have done...quick and very targeted approach" - Fine by me, I'm good with having a starting point and working with it a bit. Plus, I'd prefer to see how application devs like yourself prefer to use it. - That's how I'll always think of it;) - Seth On Friday, June 12, 2020 at 6:04:09 PM UTC-4 [hidden email] wrote:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/1566ea23-29f4-4e22-a0ae-072c00b05610n%40googlegroups.com. |
In reply to this post by rjuli...@gmail.com
I am getting an error trying to import the MIMEMailApp.app -
Just wanting to load it to see how to add attachments...
-- You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/8a52560b-cc97-4702-a93e-b047f8990de9o%40googlegroups.com. |
Administrator
|
On Mon, Oct 12, 2020 at 5:42 PM Wayne Johnston <[hidden email]> wrote:
I think a .app file is just a file out of the application. See if it is plain text. Typically, you import from a .dat file.
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAGNapEOzNQsXRf6-BttHqS8LjPTDFvgnLkjqkYp5phwdf-PgTA%40mail.gmail.com. |
Oops. Thanks!
--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/6e86a488-8dfb-4094-8f5d-dbd093c9f65eo%40googlegroups.com. |
I have QuotedPrintableCoderApp and SeasideCoreApp loaded, so could file that code in. And I have GreaseCoreApp and GreaseVASTCoreApp loaded too. But there are several methods with the yellow exclamation mark meaning referencing a method that doesn't exist. Perhaps a complete list of non-existent methods: asFileReference, binaryWriteStreamDo:, beginsWith:, decodeMimeHeader, asText, primUTCSecondsClock, asTwoCharacterString, Date class>>#fromSeconds:. Where do I get them?
-- You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/9df77afd-330f-4161-936d-e265d721c8bao%40googlegroups.com. |
Wayne, sorry for that. Maybe my "port" is a bit brute force. MIMEDocument>>#saveToFile: isn't used when sending mails, so I didn't actually care. Same for the others you mentioned. If you need that code, you'd have to go get it from Pharo. When I ported this stuff, it was the least ugly thing to port and get my stuff working. I still find this whole MIMEMessage cruft an excellent example of a completely failed API ;-) But sometimes you need to use brute force to get something done. I would rather see a nice and clean wrapper for building emails in a comprehensive way. There are nice examples in, say, Python. But I could either build me a nice little library for constructing mails and let my other work mature until it gets done by itself or follow some short path... Joachim [hidden email] schrieb am Dienstag, 13. Oktober 2020 um 17:30:34 UTC+2:
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/82aa033c-6259-4a39-8160-7b4eb431ebedn%40googlegroups.com. |
Free forum by Nabble | Edit this page |