I've got a head ache!!

Neither your code, nor sample from Xojo (with or without SecureSocket) 
is working.:-(

I try MBS example 'Send email' from the CURL plugin, it immediatly works.

Can't figure out why Xojo based commands do not work... :-

It's a little bit annoying that Xojo commands or examples do not work, 
while MBS ones work well.
I just have to congratulate Christian: thanks a lot for your job.


Jean-Luc Arnaud


Le 06/11/2014 18:34, Myron Meyer a écrit :
> You are Welcome,
> This is the Code that I use, as a reference for you. This works for me with 
> XOJO 2014.r2 on Mac (Mt.Lion  OS X 10.8.4) and Windows 7
> I have these required Fields for the User to fill in:
> fromAddressFld_Name   // The User's Name
> fromAddressFld.  // The User's eMail Address
> subjectFld.Text  // What the User is contacting me about
> FeedBackWindow.BodyField  // The User's comments
>
>    Dim mail As EmailMessage
>    Dim file As EmailAttachment
>    Dim i As Integer
>    Dim s As String
>    
>    // Set up the Socket - Let it know who to connect to
>    FeedBackWindow.MailSocket.Address = "smtp.gmail.com" // I use Gmail, for 
> this eMail
>    FeedBackWindow.MailSocket.Port = 465
>    FeedBackWindow.MailSocket.Username = "MyUserName"  // Gmail account used 
> to send the info
> //  I set up a separate eMail account to be used specifically  for sending 
> the FeedBack
>
>    FeedBackWindow.MailSocket.Password =  "MyPassword"
>    
>    //  Check to see if the User filled in their name
>    if FeedBackWindow.fromAddressFld_Name.Text = "" then // The User's Name
>      MsgBox "Oops, I think you forgot to enter your name."
>      FeedBackWindow.fromAddressFld_Name.SetFocus
>      exit
>    end if
>    
>    //  Check to see if the User filled in their eMail address
>    if FeedBackWindow.fromAddressFld.Text = "" then // The User's eMail Adress
>      MsgBox "Oops, I think you forgot to enter yourEmail address."
>      FeedBackWindow.fromAddressFld_Name.SetFocus
>      exit
>    end if
>    
>    // check to see if theUser's eMail Address has all of the necessary 
> Characters (@ and .)
>    if FeedBackWindow.fromAddressFld.Text <> "" then
>      
>      Dim rg as New RegEx
>      Dim myMatch as RegExMatch
>      rg.SearchPattern= "^.+@.+\..{2,4}$"
>      myMatch = rg.search(FeedBackWindow.fromAddressFld.text)
>
>      if myMatch <> Nil then
>        FeedBackWindow.Label6.text = myMatch.SubExpressionString(0) // This is 
> an Invisible Label used for Testing Purposes
>      else
>        MsgBox "Oops, I think there is something wrong with your Email 
> address."
>        FeedBackWindow.fromAddressFld_Name.SetFocus
>        exit
>      End if
>    end if
>    
>    // Check to see if all of the other Fields contain some Text
>    if FeedBackWindow.subjectFld.Text = "" then
>      MsgBox "Oops, I think you forgot to add a subject"
>      FeedBackWindow.subjectFld.SetFocus
>      exit
>    end if
>    
>    if FeedBackWindow.BodyField.Text = "" then
>      MsgBox "Oops, I think you forgot to add a comment."
>      FeedBackWindow.BodyField.SetFocus
>      exit
>    end if
>    
>    
>    // populate the email message
>    mail = New EmailMessage
>    mail.FromAddress = FeedBackWindow.fromAddressFld.Text // The User's eMail
>    mail.Subject = FeedBackWindow.subjectFld.Text
>
> // The Body contains all of the info. in the required Fields
>    mail.BodyPlainText = "User Name:   " + 
> FeedBackWindow.fromAddressFld_Name.Text   + EndOfLine +  "User Email:   " +  
> FeedBackWindow.fromAddressFld.Text + _
>    EndOfLine + "Subject:  " +  FeedBackWindow.subjectFld.Text + EndOfLine + 
> EndOfLine + FeedBackWindow.BodyField.Text
>    
>
>    mail.Headers.AppendHeader("X-Mailer", "FeedBack Report")
>    
>    // add recipients
>    s = ReplaceAll("My eMail address where I want the eMail  Sent", ",", 
> Chr(13))
>    s = ReplaceAll(s, Chr(13)+Chr(10), Chr(13))
>    For i = 1 To CountFields(s, Chr(13))
>      mail.AddRecipient(Trim(NthField(s, Chr(13), i)))
>    Next
>    
>    
>    // send the email
>    FeedBackWindow.MailSocket.Messages.Append(mail)
>    
>    FeedBackWindow.MailSocket.SendMail
>     
>    exception err as RegExException
>      MsgBox err.message
>
> HTH - Myron
>      
> On Nov 6, 2014, at 12:46 AM, Jean-Luc Arnaud <[email protected]> wrote:
>
>> Thanks, Greg and Myron.
>>
>> It seems like I will have to test Secure Socket...
>> Will let you know if it works.
>>
>> Jean-Luc Arnaud
>>
>> Le 05/11/2014 18:28, Myron Meyer a écrit :
>>> Jean-Luc (I copied & pasted it this time)
>>>>> Do you think I should (or I have to) use a SecureSocket?
>>>   You don't have to, but I believe the XOJO LR recommends  it (can't 
>>> remember where), and it does seem like a good thing to do. That's why I use 
>>> it.
>>> Myron
>>> On Nov 5, 2014, at 1:34 AM, Jean-Luc Arnaud <[email protected]> 
>>> wrote:
>>>
>>>> Myron,
>>>>
>>>> Thanks for the reply, and don't worry for mispelling my first name, more 
>>>> especially as you mispelled it in the three messages!;-)
>>>> It's Jean-Luc (with a final C), not Jean-Luke nor Jean-Luk. But it doesn't 
>>>> matter!:-)
>>>>
>>>> I don't use a SMTPSecureSocket, and it works well with previous versions 
>>>> of Xojo (actually, RealBasic).
>>>> Do you think I should (or I have to) use a SecureSocket?
>>>>
>>>> Jean-Luc Arnaud
>>>>
>>>> Le 05/11/2014 06:49, Myron Meyer a écrit :
>>>>> Jean-Luk,
>>>>> My Oops, please pardon the previous misspelling of your name.
>>>>> Myron
>>>>> On Nov 4, 2014, at 12:48 PM, Myron Meyer <[email protected]> wrote:
>>>>>
>>>>>> Jean-Luke
>>>>>> I should have clarified that "MailSocket" is the name of a 
>>>>>> SMTPSecureSocket
>>>>>> Myron
>>>>>> On Nov 4, 2014, at 12:15 PM, Myron Meyer <[email protected]> wrote:
>>>>>>
>>>>>>> Jean-Luke,
>>>>>>> I use basically the same code. The difference I see is:
>>>>>>> MailSocket.Port = 465 // what I use
>>>>>>> Could that be the problem?
>>>>>>> Myron
>>>>>>>
>>>>>>> On Nov 4, 2014, at 10:02 AM, Jean-Luc Arnaud <[email protected]> 
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Oups! A little bit tired, I thing ...
>>>>>>>>
>>>>>>>> Using RB 2011r3 (and not Xojo 2013r3), my code works.
>>>>>>>>
>>>>>>>> Sorry for the confusion.
>>>>>>>>
>>>>>>>> Jean-Luc Arnaud
>>>>>>>>
>>>>>>>> Le 04/11/2014 18:58, Jean-Luc Arnaud a écrit :
>>>>>>>>> Now, I know what changed: Xojo version!
>>>>>>>>>
>>>>>>>>> Using Xojo 2013r3.1, my code works (IDE and compilation).
>>>>>>>>> What changed between 2013r3.1 and 2014r2.1 (or previous) in the 
>>>>>>>>> SMTPSocket class?
>>>>>>>>>
>>>>>>>>> TIA
>>>>>>>>>
>>>>>>>>> Jean-Luc Arnaud
>>>>>>>>>
>>>>>>>>> Le 04/11/2014 18:44, Jean-Luc Arnaud a écrit :
>>>>>>>>>> Hi all,
>>>>>>>>>>
>>>>>>>>>> I coded a utility checking a server.
>>>>>>>>>> Each time the server is down, this utility tries to restart the 
>>>>>>>>>> server (this works) and send a mail to the admin (that is, me!).
>>>>>>>>>> This worked very well before (before what, I don't know) and I can't 
>>>>>>>>>> figure out what's happening, but no mail is now sent.
>>>>>>>>>>
>>>>>>>>>> My code (below) is based on the example of the Language Manual:
>>>>>>>>>>
>>>>>>>>>> Dim mail as EmailMessage
>>>>>>>>>> Dim s as String
>>>>>>>>>> Dim d As Date
>>>>>>>>>>
>>>>>>>>>> SMTPSocket1.address = ServerAddress ' Here, I tried the DNS name or 
>>>>>>>>>> the IP address, unsuccessfully
>>>>>>>>>> SMTPSocket1.port = 587
>>>>>>>>>>
>>>>>>>>>> SMTPSocket1.username = MyName ' Sorry, I can't publish this!
>>>>>>>>>> SMTPSocket1.password = MyPassword ' Sorry, I can't publish this!
>>>>>>>>>>
>>>>>>>>>> mail = New EmailMessage
>>>>>>>>>> mail.fromAddress=MyAddress
>>>>>>>>>> mail.subject=Object
>>>>>>>>>> mail.BodyPlainText = Message
>>>>>>>>>> mail.headers.appendHeader HeaderText
>>>>>>>>>>
>>>>>>>>>> //multiple To addresses separated by commas
>>>>>>>>>> //each to address added to Recipient array
>>>>>>>>>> s = Address1
>>>>>>>>>> mail.addRecipient s
>>>>>>>>>> s = MyAddress
>>>>>>>>>> mail.addRecipient s
>>>>>>>>>> s = Address2
>>>>>>>>>> mail.addRecipient s
>>>>>>>>>>
>>>>>>>>>> //send the mail
>>>>>>>>>> SMTPSocket1.messages.append mail //add email to list of messages
>>>>>>>>>> SMTPSocket1.SendMail //send message
>>>>>>>>>>
>>>>>>>>>> I get no error (LastErrorCode=0) but no message, too!
>>>>>>>>>>
>>>>>>>>>> I tried with the example project "eMail example", and I got this 
>>>>>>>>>> message "Sorry, you must authenticate first".
>>>>>>>>>> As you can see, I do it in my code, and in the example project.
>>>>>>>>>>
>>>>>>>>>> Xojo 2013r3.3 or 2014r2.1, Mac OS X 10.10 (IDE) and Mac OS 10.6.8 
>>>>>>>>>> (compiled app).
>>>>>>>>>>
>>>>>>>>>> Any advice welcome, I'm becoming crazy with that!>:o
>>>>>>>>>>
>>>>>>>>>> TIA
>>>>>>>>>>
>>>>>>>>>> Jean-Luc
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Unsubscribe by sending a message to:
>>>>>>>>>> <[email protected]>
>>>>>>>>>>
>>>>>>>>>> List Help: <[email protected]>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> Unsubscribe by sending a message to:
>>>>>>>>> <[email protected]>
>>>>>>>>>
>>>>>>>>> List Help: <[email protected]>
>>>>>>>>>
>>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Unsubscribe by sending a message to:
>>>>>>>> <[email protected]>
>>>>>>>>
>>>>>>>> List Help: <[email protected]>
>>>>> _______________________________________________
>>>>> Unsubscribe by sending a message to:
>>>>> <[email protected]>
>>>>>
>>>>> List Help: <[email protected]>
>>>>>
>>>> _______________________________________________
>>>> Unsubscribe by sending a message to:
>>>> <[email protected]>
>>>>
>>>> List Help: <[email protected]>
>>> _______________________________________________
>>> Unsubscribe by sending a message to:
>>> <[email protected]>
>>>
>>> List Help: <[email protected]>
>>>
>>
>> _______________________________________________
>> Unsubscribe by sending a message to:
>> <[email protected]>
>>
>> List Help: <[email protected]>
>
> _______________________________________________
> Unsubscribe by sending a message to:
> <[email protected]>
>
> List Help: <[email protected]>
>


_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Reply via email to