Code:
Sub Testies_GermanTelekom_Send_FromTests() ' https://telekomhilft.telekom.de/t5/E-Mail-Programme/Die-Nachricht-wurde-nicht-an-den-SMTP-Server-gesendet-werden-Der/m-p/4219080#M72050
Dim CDO_Msg_Find As String
'_1) Some basic points: ( Relevant for when there in no < > pair in the .From string, and no Commas , )
Let CDO_Msg_Find = " f @wx"
Call GermanTelekom_Send_FromTests("MaxHaedroom@t-online.de", "MaxHaedSend", CDO_Msg_Find): Call GermanTelekom_Send_FromTests("Bouncing-Tigger@t-online.de", "Tiggysending.!*", CDO_Msg_Find)
Let CDO_Msg_Find = " f n @wxyz "
Call GermanTelekom_Send_FromTests("MaxHaedroom@t-online.de", "MaxHaedSend", CDO_Msg_Find): Call GermanTelekom_Send_FromTests("Bouncing-Tigger@t-online.de", "Tiggysending.!*", CDO_Msg_Find)
Let CDO_Msg_Find = " f n ""k@wxyz"" "
Call GermanTelekom_Send_FromTests("MaxHaedroom@t-online.de", "MaxHaedSend", CDO_Msg_Find): Call GermanTelekom_Send_FromTests("Bouncing-Tigger@t-online.de", "Tiggysending.!*", CDO_Msg_Find)
Let CDO_Msg_Find = " f @w x " ' Fail: contradicts _1(ii)
Call GermanTelekom_Send_FromTests("MaxHaedroom@t-online.de", "MaxHaedSend", CDO_Msg_Find): Call GermanTelekom_Send_FromTests("Bouncing-Tigger@t-online.de", "Tiggysending.!*", CDO_Msg_Find)
' -2147220979: Es ist mindestens eines der Felder "Von" oder "Absender" erforderlich, es wurde jedoch keines der Felder gefunden.
Let CDO_Msg_Find = "e g ""@wxyz "" " ' Fail: conradicts _1(ii)
Call GermanTelekom_Send_FromTests("MaxHaedroom@t-online.de", "MaxHaedSend", CDO_Msg_Find): Call GermanTelekom_Send_FromTests("Bouncing-Tigger@t-online.de", "Tiggysending.!*", CDO_Msg_Find)
' -2147220979: Es ist mindestens eines der Felder "Von" oder "Absender" erforderlich, es wurde jedoch keines der Felder gefunden.
Let CDO_Msg_Find = "@wxyz" ' Fail: contradicts _1(vi)
Call GermanTelekom_Send_FromTests("MaxHaedroom@t-online.de", "MaxHaedSend", CDO_Msg_Find): Call GermanTelekom_Send_FromTests("Bouncing-Tigger@t-online.de", "Tiggysending.!*", CDO_Msg_Find)
' -2147220975: Die Nachricht konnte nicht an den SMTP-Server gesendet werden. Der Transportfehlercode lautet 0x800ccc6f. Die Serverantwort lautet 554 5.7.1 Database error. / This is not one of your allowed aliases -2147220975: Die Nachricht konnte nicht an den SMTP-Server gesendet werden. Der Transportfehlercode lautet 0x800ccc6f. Die Serverantwort lautet 554 5.7.1 Database error. / Der angegebene Absender ist keiner Ihrer erlaubten Aliase.
Let CDO_Msg_Find = "e f 1234 g hash@wxyz "
Call GermanTelekom_Send_FromTests("MaxHaedroom@t-online.de", "MaxHaedSend", CDO_Msg_Find): Call GermanTelekom_Send_FromTests("Bouncing-Tigger@t-online.de", "Tiggysending.!*", CDO_Msg_Find)
Let CDO_Msg_Find = "e f ""1234"" g hash@wxyz "
Call GermanTelekom_Send_FromTests("MaxHaedroom@t-online.de", "MaxHaedSend", CDO_Msg_Find): Call GermanTelekom_Send_FromTests("Bouncing-Tigger@t-online.de", "Tiggysending.!*", CDO_Msg_Find)
Let CDO_Msg_Find = "This is a very long piece of text. It seems to have no effect kjsh 12345 g hash@wxyz "
Call GermanTelekom_Send_FromTests("MaxHaedroom@t-online.de", "MaxHaedSend", CDO_Msg_Find): Call GermanTelekom_Send_FromTests("Bouncing-Tigger@t-online.de", "Tiggysending.!*", CDO_Msg_Find)
Let CDO_Msg_Find = "This is a very long piece of text. It seems to have no effect Dies ist ein sehr langer Text. Es scheint keine Wirkung zu haben kjsh 12345 g hash@wxyz "
Call GermanTelekom_Send_FromTests("MaxHaedroom@t-online.de", "MaxHaedSend", CDO_Msg_Find): Call GermanTelekom_Send_FromTests("Bouncing-Tigger@t-online.de", "Tiggysending.!*", CDO_Msg_Find)
' In the above working examples, for example, imagine an Email address such as MaxHaedroom@t-online.de ,
' Then in that case , I would see this in the InBox list , .._
' MaxHaedroom InBox.JPG : https://imgur.com/qxZyvAO , https://imgur.com/pou2a45
'_.. and this is how the Email looks
' Von_ MaxHaedroom in EMail.JPG : https://imgur.com/fXDCQO7
'_--------------------------------
'_2) Choosing the text in the InBox list.
'_2a) Using a single comma ,
'-2a)(i) Using a comma at some distant point to the right of a long text
Let CDO_Msg_Find = "12345678,9012345678901234567890 This is a very long piece of text. It ..... ..... kjsh 12345 g hash@wxyz "
Call GermanTelekom_Send_FromTests("MaxHaedroom@t-online.de", "MaxHaedSend", CDO_Msg_Find): Call GermanTelekom_Send_FromTests("Bouncing-Tigger@t-online.de", "Tiggysending.!*", CDO_Msg_Find)
'_2b) Multiple commas
Let CDO_Msg_Find = "12345678,9012345678901234567890 This is a very long piece of te , xt. It ..... ..... kjsh 12345 g hash@wxyz "
Call GermanTelekom_Send_FromTests("MaxHaedroom@t-online.de", "MaxHaedSend", CDO_Msg_Find): Call GermanTelekom_Send_FromTests("Bouncing-Tigger@t-online.de", "Tiggysending.!*", CDO_Msg_Find)
'2)c) The effect of quotes in the string
'2)c)(i) We no longer can have a space before the @ if we want to choose the InBox text ,... This will not error, and the Email will be sent. But The InBox will show the Email address used in the program's sendusername code line .From = " nnnnnn f "" n m n"" n @wx "
Let CDO_Msg_Find = " nnnnnn f "" n m n"" n@wx "
Call GermanTelekom_Send_FromTests("MaxHaedroom@t-online.de", "MaxHaedSend", CDO_Msg_Find): Call GermanTelekom_Send_FromTests("Bouncing-Tigger@t-online.de", "Tiggysending.!*", CDO_Msg_Find)
' 2c)(iii) ... the position of the first quote seems irrelevant
Let CDO_Msg_Find = " n""nnnnn f n m n"" n@wx "
Call GermanTelekom_Send_FromTests("MaxHaedroom@t-online.de", "MaxHaedSend", CDO_Msg_Find): Call GermanTelekom_Send_FromTests("Bouncing-Tigger@t-online.de", "Tiggysending.!*", CDO_Msg_Find)
Let CDO_Msg_Find = " n""nnnnn f n m n""n@wx "
Call GermanTelekom_Send_FromTests("MaxHaedroom@t-online.de", "MaxHaedSend", CDO_Msg_Find): Call GermanTelekom_Send_FromTests("Bouncing-Tigger@t-online.de", "Tiggysending.!*", CDO_Msg_Find)
Let CDO_Msg_Find = " n""nnnnn f n m n"" n@wx "
Call GermanTelekom_Send_FromTests("MaxHaedroom@t-online.de", "MaxHaedSend", CDO_Msg_Find): Call GermanTelekom_Send_FromTests("Bouncing-Tigger@t-online.de", "Tiggysending.!*", CDO_Msg_Find)
' 2c)(iv) The position of the second quote pair is important, the next two are OK....
Let CDO_Msg_Find = "n""nnnnn f n m n""n@wx "
Call GermanTelekom_Send_FromTests("MaxHaedroom@t-online.de", "MaxHaedSend", CDO_Msg_Find): Call GermanTelekom_Send_FromTests("Bouncing-Tigger@t-online.de", "Tiggysending.!*", CDO_Msg_Find)
Let CDO_Msg_Find = " n""nnnnn f n m n"" n@wx "
Call GermanTelekom_Send_FromTests("MaxHaedroom@t-online.de", "MaxHaedSend", CDO_Msg_Find): Call GermanTelekom_Send_FromTests("Bouncing-Tigger@t-online.de", "Tiggysending.!*", CDO_Msg_Find)
' ... the next will result in the InBox text reverting back to the Email address used in the program's sendusername code line
Let CDO_Msg_Find = " n""nnnnn f n m n"" y n@wx "
Call GermanTelekom_Send_FromTests("MaxHaedroom@t-online.de", "MaxHaedSend", CDO_Msg_Find): Call GermanTelekom_Send_FromTests("Bouncing-Tigger@t-online.de", "Tiggysending.!*", CDO_Msg_Find)
' 2d) effect of comer and quotes combination
' 2d)(i) If a comer appears within the pair of VBA quotes, then it is taken as a simple literal comer, rather than "text choice type" of comer discussed in 2a) and 2b)
Let CDO_Msg_Find = "hhkhk,h n""nnnn,n f n m n"" n@wx "
Call GermanTelekom_Send_FromTests("MaxHaedroom@t-online.de", "MaxHaedSend", CDO_Msg_Find): Call GermanTelekom_Send_FromTests("Bouncing-Tigger@t-online.de", "Tiggysending.!*", CDO_Msg_Find)
' In InBox list is hhkhk , h n nnnn,n f n m n
' 2d(ii)
Let CDO_Msg_Find = "hhkhk,h n""nnnn,n f n m n"" kk n@wx "
Call GermanTelekom_Send_FromTests("MaxHaedroom@t-online.de", "MaxHaedSend", CDO_Msg_Find): Call GermanTelekom_Send_FromTests("Bouncing-Tigger@t-online.de", "Tiggysending.!*", CDO_Msg_Find)
' In InBox list hhkhk ,
' 2e) Use of < > within the .From string
' Here 5 working examples for 2e)
Let CDO_Msg_Find = "hh < 9 @ > ggt < jjhh""h "" h @ kk 89 uit> nn mk"
Call GermanTelekom_Send_FromTests("MaxHaedroom@t-online.de", "MaxHaedSend", CDO_Msg_Find): Call GermanTelekom_Send_FromTests("Bouncing-Tigger@t-online.de", "Tiggysending.!*", CDO_Msg_Find)
' in InBox list is hh ggt nn mk
Let CDO_Msg_Find = " < jjhh""h "" h @ kk 89 uit> "
Call GermanTelekom_Send_FromTests("MaxHaedroom@t-online.de", "MaxHaedSend", CDO_Msg_Find): Call GermanTelekom_Send_FromTests("Bouncing-Tigger@t-online.de", "Tiggysending.!*", CDO_Msg_Find)
' in InBox list is ... In this case in the InBox will be the Email address used in the program's sendusername code line , ( unless the Email is recognised as one in your address book, in which case the name from your address book will be shown )
Let CDO_Msg_Find = " m < jjhh""h "" h @ kk 89 uit> n"
Call GermanTelekom_Send_FromTests("MaxHaedroom@t-online.de", "MaxHaedSend", CDO_Msg_Find): Call GermanTelekom_Send_FromTests("Bouncing-Tigger@t-online.de", "Tiggysending.!*", CDO_Msg_Find)
' in InBox list is m n
Let CDO_Msg_Find = "hh < 9 @ m > ggt < jjhh""h "" h @ kk 89 uit> nn mk"
Call GermanTelekom_Send_FromTests("MaxHaedroom@t-online.de", "MaxHaedSend", CDO_Msg_Find): Call GermanTelekom_Send_FromTests("Bouncing-Tigger@t-online.de", "Tiggysending.!*", CDO_Msg_Find)
' in InBox list is hh ggt nn mk
Let CDO_Msg_Find = "hh ""< @ >"" ggt < jjhh""h "" h @ kk 89 uit> nn mk"
Call GermanTelekom_Send_FromTests("MaxHaedroom@t-online.de", "MaxHaedSend", CDO_Msg_Find): Call GermanTelekom_Send_FromTests("Bouncing-Tigger@t-online.de", "Tiggysending.!*", CDO_Msg_Find)
' in InBox list is hh @ ggt nn mk
Let CDO_Msg_Find = "hh ""< Spammer@t-online.de >"" ggt < jjhh""h "" h @ kk 89 uit> nn mk"
Call GermanTelekom_Send_FromTests("MaxHaedroom@t-online.de", "MaxHaedSend", CDO_Msg_Find): Call GermanTelekom_Send_FromTests("Bouncing-Tigger@t-online.de", "Tiggysending.!*", CDO_Msg_Find)
' in InBox list is hh Spammer@t-online.de..
' Note: in the last 5 examples, after the Von: In the Email , the shown text string will appear , ( unless the Email is recognised as one in your address book, in which case the name from your address book will be shown. This is perhaps a bit unexpected, as it is replacing the shown text string with the name, rather than replacing the Email address with the name, as was noted as the case in 1) !!! )
' 2e)(v) The following two examples will error: -2147220975: Die Nachricht konnte nicht an den SMTP-Server gesendet werden. Der Transportfehlercode lautet 0x800ccc6f. Die Serverantwort lautet 554 5.7.1 Database error. / This is not one of your allowed aliases -2147220975: Die Nachricht konnte nicht an den SMTP-Server gesendet werden. Der Transportfehlercode lautet 0x800ccc6f. Die Serverantwort lautet 554 5.7.1 Database error. / Der angegebene Absender ist keiner Ihrer erlaubten Aliase.
Let CDO_Msg_Find = "hh < @ x > ggt < jjhh""h "" h @ kk 89 uit> nn mk"
Call GermanTelekom_Send_FromTests("MaxHaedroom@t-online.de", "MaxHaedSend", CDO_Msg_Find): Call GermanTelekom_Send_FromTests("Bouncing-Tigger@t-online.de", "Tiggysending.!*", CDO_Msg_Find)
Let CDO_Msg_Find = "hh < @ > ggt < jjhh""h "" h @ kk 89 uit> nn mk"
Call GermanTelekom_Send_FromTests("MaxHaedroom@t-online.de", "MaxHaedSend", CDO_Msg_Find): Call GermanTelekom_Send_FromTests("Bouncing-Tigger@t-online.de", "Tiggysending.!*", CDO_Msg_Find)
'_------------------------------------
'Let CDO_Msg_Find = ""
' Call GermanTelekom_Send_FromTests("MaxHaedroom@t-online.de", "MaxHaedSend", CDO_Msg_Find): Call GermanTelekom_Send_FromTests("Bouncing-Tigger@t-online.de", "Tiggysending.!*", CDO_Msg_Find)
End Sub
Bookmarks