Alpha Video Training
Results 1 to 9 of 9

Thread: SMTP with office 365

  1. #1
    Member
    Real Name
    Irwin Cohen
    Join Date
    Oct 2009
    Location
    Brooklyn, NY, USA
    Posts
    145

    Default SMTP with office 365

    We have been sending email using the smtp email routines with a godaddy email server for a few years.
    EMAIL_SMTP_OPEN( pSocket as P, SMTP_Server as C [, Port as N [, Username as C [, Password as C [, Mode as C ]]]] )
    EMAIL_SMTP_SEND( pMessage as P, pSocket as P [, lStatus as L [, autowrap as L ]] )
    EMAIL_SMTP_CLOSE()
    We just switched to office365 and the SMTP parameters are:
    SMTP_Server=smtp.office365.com
    Port=587
    Mode=TLS
    Now EMAIL_SMTP_OPEN returns true and a following EMAIL_SMTP_CLOSE() returns true but EMAIL_SMTP_SEND returns false and a susequent EMAIL_SMTP_CLOSE() also returns false. The content of the message has not changed.
    Has anybody else been using office365 (actually Go Daddy Office 365) with these SMTP routines?
    Thanks,
    Irwin

  2. #2
    Member
    Real Name
    Craig Schumacker
    Join Date
    May 2000
    Posts
    690

    Default Re: SMTP with office 365

    Irwin:

    I think you will need to post your code (with a fake user name and password, and fake email addresses) before anyone can help.

  3. #3
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,628

    Default Re: SMTP with office 365

    What does GoDaddy 365 support say should work?
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  4. #4
    Member
    Real Name
    Irwin Cohen
    Join Date
    Oct 2009
    Location
    Brooklyn, NY, USA
    Posts
    145

    Default Re: SMTP with office 365

    Thanks for reading, here is the sample code:
    Code:
    dim pm as P
    dim ps as P
    dim eflag as l
    eflag = .f.
    ps.timeout = 10000
    eflag = email_smtp_open(ps, "smtp.office365.com", 587, "some_user", "some_password", "TLS")
    pm.to = "some1@there.com"
    pm.from = " some2@there.com "
    pm.from_alias = "someword"
    pm.subject = "thesubject"
    pm.attachments = "theattachments"
    pm.message = "thetext"
    pm.html_message = ""
    eflag = email_smtp_send(pm, ps)
    eflag = email_smtp_close(ps)
    and it is the email_smtp_send that fails.

    Godaddy support confirms that "smtp.office365.com", 587, "some_user", "some_password", "TLS" are correct for the server name, the port, the user, the password and the TLS protocol. I have not asked more of them.
    Thanks for your interest,
    Irwin

  5. #5
    Member
    Real Name
    Craig Schumacker
    Join Date
    May 2000
    Posts
    690

    Default Re: SMTP with office 365

    Hmmm... On the way out the door, but it looks ok in format.

    I take it these setting work in another email client like Outlook desktop?

    I've never increased the timeout. Try remming out that line.

    If that doesn't work, try

    ps.mode = "TLS" ' In case there is an undocumented setting?

    and then try

    ps.mode = "SSL"

    I'm sure others will throw better ideas in the ring, but I tried!

    (By the way, those are the right setting as per Microsoft's site...)

  6. #6
    VAR
    Real Name
    Martin W. Cole
    Join Date
    Apr 2000
    Location
    Terrell, Texas (near Dallas)
    Posts
    5,957

    Default Re: SMTP with office 365

    I'm not sure if this is relevant, but
    GoDaddy has 2 types of email accounts
    the simple one has pop3 but the more sophisticated one does not
    I ran into this with one of my clients, so I used some's pop 3 settings from a different account, but the the emailto and the emailfrom in the script reference the email addresses in office365

    I also use mandrill, too, with the same to and from
    Cole Custom Programming - Terrell, Texas
    972 524 8714
    martin_w_cole@msn.com

    ____________________
    "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

  7. #7
    "Certified" Alphaholic kkfin's Avatar
    Real Name
    Kenneth
    Join Date
    Dec 2006
    Location
    EU
    Posts
    1,560

    Default Re: SMTP with office 365

    Quote Originally Posted by irwincohen View Post
    Has anybody else been using office365 (actually Go Daddy Office 365) with these SMTP routines?
    I am using Office 365 but directly with Microsoft(seems to have identical settings with GoDaddy).

    For reason or other I also did not get it work using email_smtp_...

    But using Node it works . If you are interested going to this path let me know.

  8. #8
    VAR
    Real Name
    Martin W. Cole
    Join Date
    Apr 2000
    Location
    Terrell, Texas (near Dallas)
    Posts
    5,957

    Default Re: SMTP with office 365

    Kenneth - how does the node work
    Cole Custom Programming - Terrell, Texas
    972 524 8714
    martin_w_cole@msn.com

    ____________________
    "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

  9. #9
    "Certified" Alphaholic kkfin's Avatar
    Real Name
    Kenneth
    Join Date
    Dec 2006
    Location
    EU
    Posts
    1,560

    Default Re: SMTP with office 365

    Quote Originally Posted by martinwcole View Post
    Kenneth - how does the node work
    At that time the node solution in Alpha did use Alpha install folder as place for node files so the procedure was similar for web and desktop.

    The problem was that the node solution did use admin credentials which in the end was in my opinion too risky to continue. Alpha did change the node file locations to web root (this is how the desktop part also now works with node) and which I did find too risky (I did use web part) because configuration files are also in the web root and they are js files and you can not protect them in web root.

    So I did give up with this.

    Kenneth

Similar Threads

  1. Email Settings and Office 365
    By glenschild in forum Application Server Version 11 - Web/Browser Applications
    Replies: 8
    Last Post: 03-28-2019, 06:51 PM
  2. Email and Office 365
    By StephenP in forum Application Server Version 11 - Web/Browser Applications
    Replies: 1
    Last Post: 07-10-2015, 07:35 PM
  3. Revisited - Office 365 emailing using Alpha Anywhere
    By swest in forum Mobile & Browser Applications
    Replies: 7
    Last Post: 05-05-2014, 07:46 PM
  4. Office 365 to send email with Alpha version 11
    By swest in forum Alpha Five Version 11 - Desktop Applications
    Replies: 1
    Last Post: 12-12-2013, 05:36 AM
  5. Publishing Alpha 5 in Microsoft Office 365 Enterprise
    By swksys in forum Application Server Version 11 - Web/Browser Applications
    Replies: 1
    Last Post: 09-25-2012, 02:01 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •