WebSite X5Help Center

 
Ryan M.
Ryan M.
User

Contact Form Using Exchange Online  en

Author: Ryan M.
Visited 3935, Followers 1, Shared 0  

Hello All,

I am trying desperately to get my contact form to work on my website.

My email is hosted be Exchange online and I have tried all of the various options to try to get email delivered to an Inbox that is hosted on my account.  I have had zero luck.  

I have tried the various options from the admin panel and was sure that smtp authentication should be the answer since I have no problem setting up scan to email on a multifunction printer using these settings.  The closest I seem to have gotten was - SMTP Error: data not accepted.  Which I guess is better than SMTP Error: connect() failed.

I have used other hosting solutoins and templates before and recieved emails from contact forms but all of this was really resolved for me by their very limited templates.  Part of me is wondering about spf records but the domain is valid in the spf record so that doesn't make sense either.

Does anyone have any advice for this?  Any help or support would be greatly apprecaited.

Thank you,

Ryan

Posted on the
16 ANSWERS - 1 CORRECT
Incomedia
Stefano G.
Incomedia

Hi Ryan.

The error you're showing me here could actually be pretty useful in trying to solve the issue. I'd say there is some kind of misconfiguration in your SMTP setting.

First of all, does your hosting allow SMTP? Secondly, are you sure all the data for SMTP were inserted correctly?

You should first check that again, and eventually contact your hosting's support immediately after, mentioning this issue. They might have special rules set in place where you might need to use emails from a specific domain (for example) or other similar quirks. I'm sure they would be you best choice in understanding why the email seem not to be working since they handle the mailing server themselves.

Please try and contact them, and then report here to me the result

Keep me posted

Thank you

Stefano

Read more
Posted on the from Stefano G.
Ryan M.
Ryan M.
User
Author

Hi Stefano,

Yes, I confirmed my hosting does support smtp.  I am using hostgator as my hosting solution and in my admin panel all test pass.

Second, yes I am sure all inputs are correct.  I followed this online guide and have logged into OWA to be sure that the username and password work.  https://support.office.com/en-us/article/how-to-set-up-a-multifunction-device-or-application-to-send-email-using-office-365-69f58e99-c550-4274-ad18-c805d654b4c4

I am not sure what else to ask my hosting solution to confirm to get this to work.  I am also not sure how else to test this.

When I download the script file from the admin panel I do no see any of my settings from website builder in there.  Should I?  Is there a place to manually check this information by checking the file by downloading it from an ftp connection?

My web host and email host are two seperate solutons.  Webhost is hostgator and email host is Microsoft Online.

Do you have any other suggestions?

Thanks,

Ryan

Read more
Posted on the from Ryan M.
Esahc ..
Esahc ..
Moderator

Ryan, if your email address is at your domain, why not simply use the smtp service provided by hostgator, I have found it faultless and reliable over many years (I also use hostgator).

Read more
Posted on the from Esahc ..
Incomedia
Stefano G.
Incomedia

Hi Ryan.

If all the tests show pass, I'm afraid the issue must be elsewhere then. Unfortunately, since you're using an Email Host which is different from your webhosting, many other factors come in play which are undefinable by us, and I would still strongly suggest you contact both your Email host provider and you Hosting provider in order to check if the communication between the two is working alright.

The Email host should be able to tell you exactly whether it is actually receiving your emails and simply not sending them afterwards and why, but I'm afraid that there is no further test that can be perform by us or by you alone, since the whole system seems to be working just fine as far as it is concerned.

Should you discover anything new from the two support teams, please let me know here

Thank you

Stefano

Read more
Posted on the from Stefano G.
Ryan M.
Ryan M.
User
Author

Hi Guys,

Sorry for the long delay in getting back a reply to you both.  I caught a nasty cold that wiped me out for a bit.

Looking into this further I decided to check the files uploaded to the host and I specifically downloaded the "imEmailForm.php" file from the server and dug through that and went through the "class.phpmailer.php" code and I feel like this is where all of the smtp, port, authentication information should be however it all seems like it is unchanged.  Values are essentiall null.  None of what I am putting in the Website builder program seems to be in here.

This information should be grabbed from the "Settings > Advanced Settings > Data Management" location, correct?

Would the information I am trying to inject be in a different file?  Am I looking in the wrong place?  If not then the program clearly didn't add the information needed to communicate the email with the smtp host.  However, I am afraid to manually change anything without being sure and I also am not confident about the password too.  Would that just go in as plain text somewhere?

I would consider using the HostGator smtp service but I feel like this could be the root cause to my problem and would be more satisfied to resolve it.

Thanks again,

Ryan

Read more
Posted on the from Ryan M.
Ryan M.
Ryan M.
User
Author

Oh and if it helps the web site is linked here.

Read more
Posted on the from Ryan M.
Ryan M.
Ryan M.
User
Author

So I tried the software and got one error with the Exchange Online Server:

504 5.7.4 Unrecognized authentication type [BN3PR03CA0089.namprd03.prod.outlook.com]
Forcing disconnection from SMTP server.
QUIT
221 2.0.0 Service closing transmission channel
Disconnected.

Error: SMTP protocol error. 504 5.7.4 Unrecognized authentication type [BN3PR03CA0089.namprd03.prod.outlook.com].
Failed to send message

So then I decieded to make a Gmail account and turned on the ability to use less secure apps and got this error:

530 5.7.0 Must issue a STARTTLS command first. o3-v6sm4773498qkg.17 - gsmtp
Forcing disconnection from SMTP server.
QUIT
221 2.0.0 closing connection o3-v6sm4773498qkg.17 - gsmtp
Disconnected.

Error: SMTP protocol error. 530 5.7.0 Must issue a STARTTLS command first. o3-v6sm4773498qkg.17 - gsmtp.
Failed to send message

I am at a loss now with Google failing too.  

I am about to reach out to Host Gator to check and see if they have a simple smtp server that I can authenticate to to send out these messages.

Otherwise I am at a loss.

Thanks again for any feedback ahead of time.

Read more
Posted on the from Ryan M.
Esahc ..
Esahc ..
Moderator

Ryan

As I stated above, they do, and it works perfectly but you need to use a local domain email address (not someone at outlook.com)

Read more
Posted on the from Esahc ..
Ryan M.
Ryan M.
User
Author

After digging deeper and deeper into this I am pretty sure the program does not properly inject the information for the php mailer script.  The php mailer script is also out dated and should probably be updated.

I am now looking into external resources to make manual edits to the the php code to get the right phpmailer script uploaded with the right information.  Hopefully I have some good friends who do web development for a living that are willing to help me out.

If there are ever any changes to the program that test my theory and update the phpmailer script up to the latest 6.0.5 version from Xwebsite's 5.2.9 version and it updates the variables properly I would be happy to try it out.

My upgrade protection recently expired but I might be willing to purchase again if this works properly.

Read more
Posted on the from Ryan M.
Incomedia
Stefano G.
Incomedia

Hi Ryan.

I'm not sure if the issue could be related to that since I believe the SMTP script is currently working for most servers and users, so I'm not really into believing something is wrong with the its version.

It might be helpful if you could get the Hostgator's credentials and test it out with those. If those work, it might be related to the credentials provided by Exchange online. If not, something might not be right with your project specifically.

Please test this out with your hosting if possible and report the result back to me so that we might investigate this further

Thank you

Stefano

Read more
Posted on the from Stefano G.
Ryan M.
Ryan M.
User
Author

Hi Stefano,

I checked in with HostGator about using their service however that will not work for me as I cannot change my MX Records on the internet.  I am a Microsoft Partner so I have to use Exchange Online and email it vital to my business.  I know for sure that the credentials are correct because using the diagnostic tool the full result is:

Connected.
220 BL0PR0102CA0006.outlook.office365.com Microsoft ESMTP MAIL Service ready at Tue, 30 Oct 2018 03:11:45 +0000
EHLO Demogorgon
250-BL0PR0102CA0006.outlook.office365.com Hello [100.35.59.219]
250-SIZE 157286400
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-STARTTLS
250-8BITMIME
250-BINARYMIME
250-CHUNKING
250 SMTPUTF8
AUTH LOGIN
504 5.7.4 Unrecognized authentication type [BL0PR0102CA0006.prod.exchangelabs.com]
Forcing disconnection from SMTP server.
QUIT
221 2.0.0 Service closing transmission channel

If you look into that error it seems like the connection is missing something to communicate with the server.  It is not reporting bad username or password.

What you are failing to respond to is the fact that the class.phpmailer.php file uploaded via ftp from Website Builder has all default and blank variables that are needed information to authenticate.  The above error code at least is from the diagnostic tool that was sent to me.  I would be happy to upload the class.phpmailer.php file if you would like to see it.

I tried injecting this information in myself manually to include things like port number, server, username, password, authentication type and mail type but I think I am still missing something as I did not get the email to send through.

I am also afraid to do too much manual editing as I don't have the proper knowledge to really know what I am doing and I don't want to casue complications elsewhere in my page.

My reference to the older version of the php mailer script comes from this link here as the solution to this persion's problem also references that the php mailer that the user was trying to use is more recent than the one in website builder however it is still considered obsolete. 

If I could see the class.phpmailer.php file having correct information in it I would feel more confident in the program appling the variables however since I do not see this than I can't help but feel there is a bug here.  If the vaiables are pulled from another file then I would be happy to look at it but clearly something is missing and this also seems to be a common issue on this forum.  

Just because it works with other smtp servers does not mean it works.  Security procedures are often changing and Exchange Online is a very popular email solution for businesses. HostGator will not be able to provide me a proper email solution for my needs.

Also, what about gmail.  I mean that diagnostic error code from my previous post is clear as day even when trying to use the worlds most popular email service.  I would be happy to use gmail to get the form out but even that does not work.  


I don't want to be a fly in the oinment but I see a lot of users on this forum suggesting issues with emails being sent via contact forms so something must be missing for us whether it is a bug in the program or the user experience that is causing us to make a mistake resulting in the failure to send.

I do really appreciate you responding and being open to replying with advice for me but stmp should work for all email servers.  Not just most and it definitly should work for all major players in the industry. 

Thanks,

Ryan

Read more
Posted on the from Ryan M.
Ryan M.
Ryan M.
User
Author

So this is where I am at and it is probably the last update unless I am wrong or there are changes.  

I was able to get a coder involved and do me a favor.  He and I looked at the contact form and the functions in place for generating and sending the email and content out.  His conclusion was that the fucntion for the contact form and the php code for the x5engine never call the authentication process to the exchange server as I set in the program.

We changed the program to use the PHP Script (Recommended) and tried again using a gmail address.  This works in the sense that it sent the email however bother the submitor and me the reciever end up getting the email in our junk.  This is because it is a diffrenet domain and server to send from the gmail address.  Noting can really be done about that but at least if someone submits I can check the junk folder for a submission.

Read more
Posted on the from Ryan M.
Esahc ..
Esahc ..
Moderator

Why do you not want an email address at your domain 

Read more
Posted on the from Esahc ..
Ryan M.
Ryan M.
User
Author

I have an email address with my domain.  It is hosted by Microsoft Exchange Online.  You can see the MX record if you look it up; murphtechllc.com.  It points to Microsoft Exchange Online services.  That makes my smtp server smtp.office365.com.

Getting the form to authenticate with that SMTP server is the issue.

It works with multi-function printers and other items.  But I cannot get it to work with the contact form.

Even the diagnostic tool would not authenticate properly.  See the error message in a previous post.

If you have another idea I am open to try but at this point it will not authenticate.

Read more
Posted on the from Ryan M.
Incomedia
Stefano G.
Incomedia

Hi Ryan.

At this point, I believe this would translate to a more precise case with the Exchange Online service where is having issue with the way the current SMTP script is build in WebSiteX5, and for this reason, I believe there is really not much further that can be done with the software automatically as to make it work correctly with what they require. Since this is a first, I will take care of notifying the developers of this need, since it might prove useful in the long run too, but again, this is probably something that will need to be taken care of manually by you as of now, since it seems that the service you're making use of simply needs something more that the software isn't providing right now.

I'm sorry being unable to help you further, but I'll be sure to notify you here should there be any specific news with this.

Thank you for your patience

Stefano

Read more
Posted on the from Stefano G.