login about faq

I can't send email if i use Office 365 account. I have the same problem if i use sTunnel....I can only use it only with Gmail account. Can anyone help me ?

The code i use is this:

LOCAL loMailman
LOCAL lnSuccess, lcSuccess
LOCAL loEmail
Local lcMessage

lcMessage = ""
*  The mailman object is used for sending and receiving email.
loMailman = CreateObject('Chilkat_9_5_0.MailMan')

*  Any string argument automatically begins the 30-day trial.
lnSuccess = loMailman.UnlockComponent("myCode")
IF (lnSuccess <> 1) THEN
    ? loMailman.LastErrorText
    RELEASE loMailman
ENDIF

*  Set the SMTP server to Office365's SMTP server.
*  Note: Please be sure to double-check the SMTP settings
*  with your provider or with the official Office365 documentation
*  provided by Microsoft.  The required settings could change...
loMailman.SmtpHost = "smtp.office365.com"
loMailman.SmtpPort = 587
loMailman.StartTLS = 1
loMailman.SmtpSSL  = 0

*  Set the SMTP login/password
loMailman.SmtpUsername = "myMail"
loMailman.SmtpPassword = "myPassword"

*  Create a new email object
loEmail = CreateObject('Chilkat_9_5_0.Email')

loEmail.Subject = This.xSubject
If !Empty(This.xHtmlBody)
    loEmail.SetHtmlBody(This.xHtmlBody)
Else
    loEmail.Body = This.xBody
Endif
loEmail.From = This.xFrom
lnSuccess = loEmail.AddMultipleTo("Test@test.com)
lnSuccess = loEmail.AddMultipleCC("")
lnSuccess = loEmail.AddMultipleBCC("")

For ii=1 To Alen(This.xFiles,1)
    lcFile = This.xFiles[ii,1]
    If !Empty(lcFile) And File(lcFile)
        lcSuccess = loEmail.AddFileAttachment(lcFile)
    Endif
EndFor

lnSuccess = loMailman.SendEmail(loEmail)
IF (lnSuccess <> 1) THEN
    lcMessage = loMailman.LastErrorText
ENDIF

asked Aug 10 at 06:05

acutservizi's gravatar image

acutservizi
261

edited Aug 10 at 11:07

jpbro's gravatar image

jpbro ♦
1.1k2618


Information about what transpired in any given Chilkat method call is always available in the LastErrorText property. If the mailman.SendEmail call failed, then immediately after (but prior to calling any other method on the same Chilkat object instance), examine the contents of the mailman.LastErrorText property. It will provide information about what happened -- and this can be used to answer questions, or to know what questions to ask.

(In general, when debugging, the 1st question to be asked is "What information sources exist to find out more about what happened?" In this case, you can examine the reference documentation to see that LastErrorText is always as source of information. You'll also find there's an SmtpSessionLog property.)

link

answered Aug 10 at 09:30

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

I updated my chilkat control and now it works

link

answered Aug 10 at 11:40

acutservizi's gravatar image

acutservizi
261

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×47

Asked: Aug 10 at 06:05

Seen: 204 times

Last updated: Aug 10 at 11:40

powered by OSQA