New topic: Email Error Catching
<http://forums.realsoftware.com/viewtopic.php?t=43992> Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message joeinazusa Post subject: Email Error CatchingPosted: Mon May 14, 2012 8:48 am Joined: Wed Jun 13, 2007 10:08 am Posts: 30 I have used the following code to send an email. No problems. As a test I turned off my email server so I can produce an error. I am always getting error code 0 (No failure) Any ideas? receiver as string subject as string body as string returns boolean dim socket1 as SMTPSocket dim mail As EmailMessage socket1 = new SMTPSocket socket1.Port = 25 socket1.Address = "127.0.0.1" socket1.Connect mail = new EmailMessage mail.FromAddress = "[email protected]" mail.Subject = subject mail.BodyPlainText = body mail.AddRecipient receiver socket1.DeleteAllMessages socket1.Messages.Append mail socket1.SendMail if socket1.LastErrorCode = 0 then return true else return false end if Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 1 post ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
