1. Gene Shnayder
  2. PowerBuilder
  3. Monday, 18 March 2024 13:26 PM UTC

Greetings,

I utilized SMTPClient and added email functionality. 

PB 2022 R2

Everything works fine when testing or debugging, but it doesn’t work using an executable file. All support dll’s are in place, I fully migrate, regenerate, and rebuild the application and still can’t send emails.

The worthwhile part, it works perfectly using PowerBuilder(running or debugging).

 

Any suggestions?

Gene

 

 

Gene Shnayder Accepted Answer Pending Moderation
  1. Thursday, 21 March 2024 11:18 AM UTC
  2. PowerBuilder
  3. # 1

I took Chris's advice and re-checked PB Runtime Libraries. My guess, a few were missing and now it works.

Gene

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 21 March 2024 19:02 PM UTC
Hi Gene ... that is awesome news .. thanks for the feedback! :-)
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Thursday, 21 March 2024 11:10 AM UTC
  2. PowerBuilder
  3. # 2

Maybe I'm missing it, but what was it that made your mark this as resolved?

Comment
There are no comments made yet.
Gene Shnayder Accepted Answer Pending Moderation
  1. Wednesday, 20 March 2024 14:53 PM UTC
  2. PowerBuilder
  3. # 3

Chris,

 

i installed PB 2022 R3, same as before: it works in PB and doesn't work from exe.

Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 20 March 2024 15:01 PM UTC
Hi Gene;

Please open a Support Ticket for this issue and attach a simple PB App test case that replicates this issue.

Them we can have a look at your PowerScript code in depth for a better analysis.

Regards .. Chris
  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 20 March 2024 15:03 PM UTC
PS: BTW: Did you install the PB runtime on the deployment machine using the PB Packager utility?
  1. Helpful 1
There are no comments made yet.
Gene Shnayder Accepted Answer Pending Moderation
  1. Wednesday, 20 March 2024 12:41 PM UTC
  2. PowerBuilder
  3. # 4

Hi Chris,

I added log file functionality and two log files were created while running the application via PB. Once I built the executable file - no log file was created and no email was sent.

It is a very strange behavior and I don't know how to solve this issue.

 

here is the log file content:

Trying 172.253.63.109:587...
Connected to smtp.gmail.com (172.253.63.109) port 587 (#0)
S: 220 smtp.gmail.com ESMTP jt13-20020a05621427ed00b006961ba15ea4sm3705708qvb.113 - gsmtp
C: EHLO DESKTOP-M9CCEN3
S: 250-smtp.gmail.com at your service, [208.105.38.227]
S: 250-SIZE 35882577
S: 250-8BITMIME
S: 250-STARTTLS
S: 250-ENHANCEDSTATUSCODES
S: 250-PIPELINING
S: 250-CHUNKING
S: 250 SMTPUTF8
C: STARTTLS
S: 220 2.0.0 Ready to start TLS
C: .....
TLSv1.3 (OUT), TLS handshake, Client hello (1):
C: ......+%.+........xK=..V....:.=&..+4g. .....20Y..[-&. '.j. K#....(....F.>.......,.0.........+./.
C: ..$.(.k.#.'.g.....9.....3.....=.<.5./.....u.........smtp.gmail.com..............................
C: ...1.....0.................................................+............-.....3.&.$... ...d.3...
C: J.R0H..,...D..rQ.7;{5.T.........................................................................
C: ................................................................................................
C: ................................
S: ....z
TLSv1.3 (IN), TLS handshake, Server hello (2):
S: ...v...)..:.....7.0fG.......v.#]..... .....20Y..[-&. '.j. K#....(....F......3.$... D..<.....K$n
S: ........].....9..o.+.+....
S: .....
S: ....<
S: .
TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
S: ......
TLSv1.3 (IN), TLS handshake, Certificate (11):
S: ...........0...0..o..........+w.qh.J:...<.0...*.H........0F1.0...U....US1"0 ..U....Google Trust
S: Services LLC1.0...U....GTS CA 1C30...240219081815Z..240513081814Z0.1.0...U....smtp.gmail.com0Y0.
S: ..*.H.=....*.H.=....B....$yc..9.S\...............9.......K...s...J8F.-......8G.d:.....b...g0..c0
S: ...U...........0...U.%..0...+.......0...U.......0.0...U......Z9Dn..u.l...2.j...1W0...U.#..0....t
S: ......=...F..q5.'0j..+........^0\0'..+.....0...http://ocsp.pki.goog/gts1c301..+.....0..%http://
S: pki.goog/repo/certs/gts1c3.der0...U....0...smtp.gmail.com0!..U. ..0.0...g.....0...+.....y...0<..
S: U...50301./.-.+http://crls.pki.goog/gts1c3/fVJxbV-Ktmk.crl0.....+.....y............v....d.....\.
S: .....2.F|....QHYFq................G0E.!...=...w;............[.wn...!..... E.I....t^v.H2.9r.s..-5
S: .q....vi...v....k?.."....\k.p.ql.Q..4..=0H..........s.....G0E. i..\*....!...I1Jn....*.....#.....
S: !....Q.....w.m6.....K...)n..;....40...*.H...............O..Y..s......o..jd.t,c:4~p ..)M.....7..H
S: .1.....]...8.........$....p ...Q.0q.....N.#*{8..>+..`. LC..aU.....I..........g...&;r..zd).....$N
S: Y4.......#|.k.~">h...7.....hx[.S./tn6.B.s.....'>.*r....Ty.5s.e.]_.Y.|v.d..<..Ty[..{..N...`#.r.A.
S: .....1>-].;.].....L.iK.....0...0..~..........SYk4....Pf0...*.H........0G1.0...U....US1"0 ..U....
S: Google Trust Services LLC1.0...U....GTS Root R10...200813000042Z..270930000042Z0F1.0...U....US1"
S: 0 ..U....Google Trust Services LLC1.0...U....GTS CA 1C30.."0...*.H.............0............b..7
S: .7B.l...e.%...k..m.Z#.........|....B.^V$.z3....i..t.WLfh.w7US.9.M.4._%w7;...<......C...G..D.c..
S: A..A0H......E.!..B...+eV4.&....}....H|7M?.....u..yW\.Wn.........%..,...*....c.<PI...._.+Y.....Q
S: ..w....O.pI.\m .......w.-...k....+........'....Q.................0..|0...U...........0...U.%..0.
S: ..+.........+.......0...U.......0.......0...U.......t......=...F..q5.'0...U.#..0.....+&q.+H'./R
S: f,....q>0h..+........\0Z0&..+.....0...http://ocsp.pki.goog/gtsr100..+.....0..$http://pki.goog/re
S: po/certs/gtsr1.der04..U...-0+0).'.%.#http://crl.pki.goog/gtsr1/gtsr1.crl0W..U. .P0N08..+.....y..
S: .0*0(..+.........https://pki.goog/repository/0...g.....0...g.....0...*.H..............}. \.<...W
S: .......rq.6...@..L.F...$..Pq"...n..jo......_.l.......b....[.f.........i>z.FI_F.A...Me4...?O.lI
S: ..SA..!.....D[*P..M.S6.B..T..wS.d8'...X..|9-[..........S$....y.&.a.SR.B..f+?...........q.5($....
S: .-.H.=Y.Q.t..|...[..4..........."....q....s$.7S...?..\.6..;.)...:b;lc...Yq.c'.L....s..*....l2.3.
S: ..Qq.4...].QX......Y.q..M(..m......F...k.w.....#.........D..u#.4.. ..^...RF.....!pQ.....U.+.3w.K
S: B..w..s.....7?..*f.s.2.2l2....#.[}Mep.+.=...m.2.....c...]...q^*..."..e:...e.....[.Y.G.-.$:...&..
S: ..7..o....Q......Q......f0..b0..J.......w..l.6...!...X..0...*.H........0W1.0...U....BE1.0...U..
S: ..GlobalSign nv-sa1.0...U....Root CA1.0...U....GlobalSign Root CA0...200619000042Z..280128000042
S: Z0G1.0...U....US1"0 ..U....Google Trust Services LLC1.0...U....GTS Root R10.."0...*.H...........
S: ..0...............w.;...>...@<....}2..q.......j.....K.+...................^..R..#'....c...~..^.
S: h...ZG.M.3.N.....lK......d)%#....=.`.......H.M..z.....Y........1.......ml....~&.E.=.y..(..&....
S: ..<h.S..:.+.....z..u....Vd..Oh.=......@..\....5l..P..L... .3.R..2.).%*.H.r..d...........8f..c..
S: .x.{\w.v......y.W..&..............U.....K)...2%N*.eD.....I...|..@{.C..l..}...L......K.....E.v..@
S: +.S....;......1..w.o{>...".....2..c.Qr.]....)h3.:f...&...Wex'.^I......!............lH<@.~.Z.V<.
S: ....K.9K..?.U.n$..q..........A...=:..z.7...........80..40...U...........0...U.......0....0...U..
S: ......+&q.+H'./Rf,....q>0...U.#..0...`{f.E....P/}..4....K0`..+........T0R0%..+.....0...http://oc
S: sp.pki.goog/gsr10)..+.....0...http://pki.goog/gsr1/gsr1.crt02..U...+0)0'.%.#.!http://crl.pki.goo
S: g/gsr1/gsr1.crl0;..U. .4020...g.....0...g.....0...+.....y....0...+.....y....0...*.H.............
S: 4...(...v..1z!..R>..t.A..=5......\_...|......W.&o[..Fh.7okz...7.%Q..h...I.Z...#...+.....Ij.u....
S: ...XHW.5.....o..o.......*..Ni..-.h..+s....".7..f.I..U.g.2..&.p.=.gm=|.4..2..n.jo.....K.;..7..D.~
S: .l..F.....!.f...Ul.)...f[.wIH(....3rS..5.b..$...9..~*A.R.......?..
TLSv1.3 (IN), TLS handshake, CERT verify (15):
S: ...K...G0E. 3]:U.8..(...T...:...b.|.....X.G..!..|.4a8...v........>..g..[......4
TLSv1.3 (IN), TLS handshake, Finished (20):
S: ...0.N.../e.......,.S...".6.(A.@.2.d...q..Y3.7Y.6.].
C: .....
TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
C: .
C: ....E
C: .
TLSv1.3 (OUT), TLS handshake, Finished (20):
C: ...0..gjn.....?=.s.>.'.K.X.u....rx..A3......-.......
SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
Server certificate:
subject: CN=smtp.gmail.com
start date: Feb 19 08:18:15 2024 GMT
expire date: May 13 08:18:14 2024 GMT
issuer: C=US; O=Google Trust Services LLC; CN=GTS CA 1C3
SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
C: ....'
C: .
C: EHLO DESKTOP-M9CCEN3
S: .....
S: .
TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
S: ........t..........@.$mKL..5~.....{....j..1...@q.o.2.h&}.4.o...[..Q...Z0.5....w.......5"....(..-
S: .zn..>.AJ.ubG....S....|..Fw....,p..k{...Fe..E.8.....G...Q..".r...I.4..U.N.~S.Ea.8>.:.U?.........
S: .W6....@6......P...EV..s.\....!Hh.........i..H.=..!.IAD...7B..C......
TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
S: ...................@.$mKL..5~.....3.d..z;.pL.Q.......jw&.|.s./6.7..6.%_.p.Z.G..h..P k.......U...
S: x]w.;.s.O*.{..$.....uk.==.I.y..._h'.9.._s.5.obb....Z...k....WwV..5.. .....D.i..I..!FTv#.qU..I/..
S: u.[q.BR..P~/...pK{....T._..5.r..[.ZX2a.`.W8vm....l..IADR@.j.f........
old SSL session ID is stale, removing
S: .....
S: .
S: 250-smtp.gmail.com at your service, [208.105.38.227]
S: 250-SIZE 35882577
S: 250-8BITMIME
S: 250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH
S: 250-ENHANCEDSTATUSCODES
S: 250-PIPELINING
S: 250-CHUNKING
S: 250 SMTPUTF8
C: .....
C: .
C: AUTH PLAIN
S: .....
S: .
S: 334
C: ....S
C: .
C: AHNjYW5uZXJuZXd5b3JrMDJAZ21haWwuY29tAGN3c3IgdmpyYyBxbHdtIGJna2o=
S: ....%
S: .
S: 235 2.7.0 Accepted
C: ....B
C: .
C: MAIL FROM:<scannernewyork02@gmail.com> SIZE=903
S: ....]
S: .
S: 250 2.1.0 OK jt13-20020a05621427ed00b006961ba15ea4sm3705708qvb.113 - gsmtp
C: ....0
C: .
C: RCPT TO:<user@cnewa.org>
S: ....]
S: .
S: 250 2.1.5 OK jt13-20020a05621427ed00b006961ba15ea4sm3705708qvb.113 - gsmtp
C: ....0
C: .
C: RCPT TO:<user@cnewa.org>
S: .....
S: .
S: 250 2.1.5 OK, duplicate recipients will be consolidated. jt13-20020a05621427ed00b006961ba15ea4sm
S: 3705708qvb.113 - gsmtp
C: ....0
C: .
C: RCPT TO:<user@cnewa.org>
S: .....
S: .
S: 250 2.1.5 OK, duplicate recipients will be consolidated. jt13-20020a05621427ed00b006961ba15ea4sm
S: 3705708qvb.113 - gsmtp
C: ....0
C: .
C: RCPT TO:<user@cnewa.org>
S: .....
S: .
S: 250 2.1.5 OK, duplicate recipients will be consolidated. jt13-20020a05621427ed00b006961ba15ea4sm
S: 3705708qvb.113 - gsmtp
C: .....
C: .
C: DATA
S: ....^
S: .
S: 354 Go ahead jt13-20020a05621427ed00b006961ba15ea4sm3705708qvb.113 - gsmtp
C: .....
C: .
C: Content-Type: multipart/mixed; boundary=------------------------0b7e223e81297333
C: Mime-Version: 1.0
C: From: Gene Shnayder <scannernewyork02@gmail.com>
C: To: user@cnewa.org
C: Cc: user@cnewa.org,
C: user@cnewa.org
C: Bcc: user@cnewa.org
C: X-Priority: 3
C: Subject: Vacation request
C:
C: Message - ID: <31179902-5E3C-4940-93B3-DCC9A00CEB84@DESKTOP-M9CCEN3>
C:
C:
C: --------------------------0b7e223e81297333
C: Content-Type: multipart/alternative; boundary=------------------------9816e7a27a8ff48f
C: Content-Disposition: inline
C:
C: --------------------------9816e7a27a8ff48f
C: Content-Type: text/plain; charset=UTF-8
C: Content-Transfer-Encoding: 8bit
C:
C: Please be alerted that user has requested the following 1 day(s) in range 3/20/2024 to
C: 3/20/2024. ..Please log in to HR Lite to view this request.
C: --------------------------9816e7a27a8ff48f--
C:
C: --------------------------0b7e223e81297333--
We are completely uploaded and fine
C: .....
C: .
S: ....i
S: .
S: 250 2.0.0 OK 1710935955 jt13-20020a05621427ed00b006961ba15ea4sm3705708qvb.113 - gsmtp
Connection #0 to host smtp.gmail.com left intact
Connection #0 to host smtp.gmail.com left intact
Email sent successfully!
End Connnect: 2024-03-20 07:59:15

==================================================================================

 

Attachments (1)
Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 20 March 2024 14:06 PM UTC
Hi Gene;

That is really weird that there was no log produced from the PB App EXE!

Can yo try a simple PB Test case using PB 2022 R3 release?

Regards .. Chris
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 19 March 2024 15:06 PM UTC
  2. PowerBuilder
  3. # 5

Hi Gene;

  Unfortunately, "doesn't work" is of no use to us to help you with this problem.

  Did you enable SMTP logging to help trace this issue?

  FYI:  https://docs.appeon.com/pb2022r2/powerscript_reference/logFile_func.html

Regards .. Chris

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.