[GH-ISSUE #291] SMTP Issue using Functional Login #251

Closed
opened 2026-02-25 21:34:33 +03:00 by kerem · 22 comments
Owner

Originally created by @malik-asghar on GitHub (Oct 11, 2018).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/291

Originally assigned to: @jasonmunro on GitHub.

Hi Guys, I have integrated Cypht into my existing project. Here is stranger behavior of Cypht when I am directly Logging into Cypht I am getting configuration for IMAP and SMPT and it is working fine for sending and receiving emails.
But when I try to Login using Functional Login I am getting Error for SMTP Server settings but IMAP settings are working fine.
Any help will be appreciated.

require '/modules/api_login/api.php';
cypht_login($user, $pass, $url);
https://github.com/jasonmunro/cypht/wiki/API-Login

Originally created by @malik-asghar on GitHub (Oct 11, 2018). Original GitHub issue: https://github.com/cypht-org/cypht/issues/291 Originally assigned to: @jasonmunro on GitHub. Hi Guys, I have integrated Cypht into my existing project. Here is stranger behavior of Cypht when I am directly Logging into Cypht I am getting configuration for IMAP and SMPT and it is working fine for sending and receiving emails. But when I try to Login using Functional Login I am getting Error for SMTP Server settings but IMAP settings are working fine. Any help will be appreciated. ------------------------------------------- require '<your path to Cypht>/modules/api_login/api.php'; cypht_login($user, $pass, $url); https://github.com/jasonmunro/cypht/wiki/API-Login
kerem 2026-02-25 21:34:33 +03:00
Author
Owner

@jasonmunro commented on GitHub (Oct 11, 2018):

Hi @malik-asghar, thanks for the feedback. I'm happy to help figure this out. Can you tell me the specific error you are seeing for the SMTP server?

<!-- gh-comment-id:428992079 --> @jasonmunro commented on GitHub (Oct 11, 2018): Hi @malik-asghar, thanks for the feedback. I'm happy to help figure this out. Can you tell me the specific error you are seeing for the SMTP server?
Author
Owner

@malik-asghar commented on GitHub (Oct 11, 2018):

@jasonmunro I am getting this Error "You need at least one configured SMTP server to send outbound messages".

I have checked hm3.ini file and SMTP settings are correctly added to this file. These settings are working fine when directly logging into Cypht but not working with Functional Login.

<!-- gh-comment-id:428997404 --> @malik-asghar commented on GitHub (Oct 11, 2018): @jasonmunro I am getting this Error "**You need at least one configured SMTP server to send outbound messages**". I have checked hm3.ini file and SMTP settings are correctly added to this file. These settings are working fine when directly logging into Cypht but not working with Functional Login.
Author
Owner

@jasonmunro commented on GitHub (Oct 11, 2018):

@malik-asghar I see the issue. the default SMTP server is only being added when the user logs in normally. I will work on a fix and let you know when it's ready!

<!-- gh-comment-id:428999479 --> @jasonmunro commented on GitHub (Oct 11, 2018): @malik-asghar I see the issue. the default SMTP server is only being added when the user logs in normally. I will work on a fix and let you know when it's ready!
Author
Owner

@malik-asghar commented on GitHub (Oct 11, 2018):

That will be great. Can you share the details about the problem?

<!-- gh-comment-id:429000667 --> @malik-asghar commented on GitHub (Oct 11, 2018): That will be great. Can you share the details about the problem?
Author
Owner

@jasonmunro commented on GitHub (Oct 11, 2018):

The problem is here:

https://github.com/jasonmunro/cypht/blob/master/modules/smtp/modules.php#L37

This module fires on any page load when the user is logged in, but the first thing it does is look for a form (HTTP POST) with the username and password (this is the login form). If found, it collects the users configured SMTP servers, and adds the default from the hm3.ini file to the list. When using the functional login, there is no HTTP POST login form, so the code is never executed, and the default server is never added.

I think the best way to fix this is to remove the check for the login form, analyze the user's list of SMTP servers, and add the default if it's not in the list yet. Once it has been added, I will set a flag indicating that, and we can short circuit the module when that flag is set to avoid unneeded overhead.

<!-- gh-comment-id:429013750 --> @jasonmunro commented on GitHub (Oct 11, 2018): The problem is here: https://github.com/jasonmunro/cypht/blob/master/modules/smtp/modules.php#L37 This module fires on any page load when the user is logged in, but the first thing it does is look for a form (HTTP POST) with the username and password (this is the login form). If found, it collects the users configured SMTP servers, and adds the default from the hm3.ini file to the list. When using the functional login, there is no HTTP POST login form, so the code is never executed, and the default server is never added. I think the best way to fix this is to remove the check for the login form, analyze the user's list of SMTP servers, and add the default if it's not in the list yet. Once it has been added, I will set a flag indicating that, and we can short circuit the module when that flag is set to avoid unneeded overhead.
Author
Owner

@jasonmunro commented on GitHub (Oct 11, 2018):

on closer examination I think I can remove this module completely, and do a "just in time" check during the module that loads SMTP servers for pages that need them to add the default if it's not there. This would be less overhead than what I described earlier, but similar (and less code!).

<!-- gh-comment-id:429015213 --> @jasonmunro commented on GitHub (Oct 11, 2018): on closer examination I think I can remove this module completely, and do a "just in time" check during the module that loads SMTP servers for pages that need them to add the default if it's not there. This would be less overhead than what I described earlier, but similar (and less code!).
Author
Owner

@jasonmunro commented on GitHub (Oct 11, 2018):

Well I started to fix this but realized it won't be as easy as I thought :) In order to configure the default SMTP server on login, we need the username and password, which is why it was built to run when the login form is submitted. I have a plan on how to fix this in a generic way such that any module set that needs to do work during the login flow will work with both standard login and functional login process, but this will take some work. The api login (not the functional way) should work, so you could try that until this is fixed. Sorry about that!

<!-- gh-comment-id:429044171 --> @jasonmunro commented on GitHub (Oct 11, 2018): Well I started to fix this but realized it won't be as easy as I thought :) In order to configure the default SMTP server on login, we need the username and password, which is why it was built to run when the login form is submitted. I have a plan on how to fix this in a generic way such that any module set that needs to do work during the login flow will work with both standard login and functional login process, but this will take some work. The api login (not the functional way) should work, so you could try that until this is fixed. Sorry about that!
Author
Owner

@jasonmunro commented on GitHub (Oct 11, 2018):

@malik-asghar fix pushed to the master branch. Could you grab the latest code and see if it works for you? thanks!

<!-- gh-comment-id:429110699 --> @jasonmunro commented on GitHub (Oct 11, 2018): @malik-asghar fix pushed to the master branch. Could you grab the latest code and see if it works for you? thanks!
Author
Owner

@malik-asghar commented on GitHub (Oct 11, 2018):

Great @jasonmunro . The issue is solved, and now SMTP is working fine. There is another issue, I have replied back to that email, when I clicked on Reply in receiver filed there was just my Outbound E-mail Domain "example.com" where as there should user@example.com.
Secondly I did not received replied email.
To check IMAP I just compose Email to user@example.com and I received that email. But first email which was reply is missing. I have got notification of Email received but it is not showing anywhere.

<!-- gh-comment-id:429158885 --> @malik-asghar commented on GitHub (Oct 11, 2018): Great @jasonmunro . The issue is solved, and now SMTP is working fine. There is another issue, I have replied back to that email, when I clicked on Reply in receiver filed there was just my **Outbound E-mail Domain "example.com" where as there should user@example.com**. Secondly I did not received replied email. To check IMAP I just compose Email to user@example.com and I received that email. But first email which was reply is missing. I have got notification of Email received but it is not showing anywhere.
Author
Owner

@malik-asghar commented on GitHub (Oct 12, 2018):

There is one more thing, and your guidance will be appreciated.
I want to hide

  1. Logout Option from Menu
  2. Settings
  3. All options related to Settings like Home, Servers, Site, Profiles, Folders
  4. Carrot Icon
  5. Reload Link

when using Functional Login.

<!-- gh-comment-id:429176132 --> @malik-asghar commented on GitHub (Oct 12, 2018): There is one more thing, and your guidance will be appreciated. I want to hide 1. Logout Option from Menu 2. Settings 3. All options related to Settings like Home, Servers, Site, Profiles, Folders 4. Carrot Icon 5. Reload Link when using Functional Login.
Author
Owner

@jasonmunro commented on GitHub (Oct 12, 2018):

Great @jasonmunro . The issue is solved, and now SMTP is working fine. There is another issue, I have replied back to that email, when I clicked on Reply in receiver filed there was just my Outbound E-mail Domain "example.com" where as there should user@example.com.
Secondly I did not received replied email.
To check IMAP I just compose Email to user@example.com and I received that email. But first email which was reply is missing. I have got notification of Email received but it is not showing anywhere.

@malik-asghar the best way to handle this is to create a profile so you can tie an IMAP server and SMTP server together and define your reply-to address, display name, etc - however, it should still default to something sane when you don't have a profile setup - so this could be a bug. I will check into it.

<!-- gh-comment-id:429327353 --> @jasonmunro commented on GitHub (Oct 12, 2018): > Great @jasonmunro . The issue is solved, and now SMTP is working fine. There is another issue, I have replied back to that email, when I clicked on Reply in receiver filed there was just my **Outbound E-mail Domain "example.com" where as there should [user@example.com](mailto:user@example.com)**. > Secondly I did not received replied email. > To check IMAP I just compose Email to [user@example.com](mailto:user@example.com) and I received that email. But first email which was reply is missing. I have got notification of Email received but it is not showing anywhere. @malik-asghar the best way to handle this is to create a profile so you can tie an IMAP server and SMTP server together and define your reply-to address, display name, etc - however, it should still default to something sane when you don't have a profile setup - so this could be a bug. I will check into it.
Author
Owner

@jasonmunro commented on GitHub (Oct 12, 2018):

There is one more thing, and your guidance will be appreciated.
I want to hide

  1. Logout Option from Menu
  2. Settings
  3. All options related to Settings like Home, Servers, Site, Profiles, Folders
  4. Carrot Icon
  5. Reload Link

when using Functional Login.

This is what the site module set is for. With this module set enabled, you can override modules from other sets and easily disable them. To remove menu entries, you need to figure out which modules you want to override, and for each one add a line of code to the modules/site/setup.php file to disable them. I will put together an example for you shortly.

<!-- gh-comment-id:429328053 --> @jasonmunro commented on GitHub (Oct 12, 2018): > There is one more thing, and your guidance will be appreciated. > I want to hide > > 1. Logout Option from Menu > 2. Settings > 3. All options related to Settings like Home, Servers, Site, Profiles, Folders > 4. Carrot Icon > 5. Reload Link > > when using Functional Login. This is what the site module set is for. With this module set enabled, you can override modules from other sets and easily disable them. To remove menu entries, you need to figure out which modules you want to override, and for each one add a line of code to the modules/site/setup.php file to disable them. I will put together an example for you shortly.
Author
Owner

@jasonmunro commented on GitHub (Oct 12, 2018):

Great @jasonmunro . The issue is solved, and now SMTP is working fine. There is another issue, I have replied back to that email, when I clicked on Reply in receiver filed there was just my Outbound E-mail Domain "example.com" where as there should user@example.com.
Secondly I did not received replied email.
To check IMAP I just compose Email to user@example.com and I received that email. But first email which was reply is missing. I have got notification of Email received but it is not showing anywhere.

@malik-asghar can you provide me with the raw content of the first E-mail, the one you then tried to reply to? You can get that by opening the message in Cypht and clicking on the "Raw" link below the headers. I think the problem is with the original message not the reply logic. Thanks!

<!-- gh-comment-id:429331598 --> @jasonmunro commented on GitHub (Oct 12, 2018): > Great @jasonmunro . The issue is solved, and now SMTP is working fine. There is another issue, I have replied back to that email, when I clicked on Reply in receiver filed there was just my **Outbound E-mail Domain "example.com" where as there should [user@example.com](mailto:user@example.com)**. > Secondly I did not received replied email. > To check IMAP I just compose Email to [user@example.com](mailto:user@example.com) and I received that email. But first email which was reply is missing. I have got notification of Email received but it is not showing anywhere. @malik-asghar can you provide me with the raw content of the first E-mail, the one you then tried to reply to? You can get that by opening the message in Cypht and clicking on the "Raw" link below the headers. I think the problem is with the original message not the reply logic. Thanks!
Author
Owner

@malik-asghar commented on GitHub (Oct 12, 2018):

Great @jasonmunro . The issue is solved, and now SMTP is working fine. There is another issue, I have replied back to that email, when I clicked on Reply in receiver filed there was just my Outbound E-mail Domain "example.com" where as there should user@example.com.
Secondly I did not received replied email.
To check IMAP I just compose Email to user@example.com and I received that email. But first email which was reply is missing. I have got notification of Email received but it is not showing anywhere.

@malik-asghar can you provide me with the raw content of the first E-mail, the one you then tried to reply to? You can get that by opening the message in Cypht and clicking on the "Raw" link below the headers. I think the problem is with the original message not the reply logic. Thanks!

Yeah sure. Here it is:

Authentication-Results: dev.example.com;
dkim=temperror header.i=masghar@example.com
Return-Path: masghar@example.com
X-Original-To: masghar@example.com
Delivered-To: masghar@example.com
Received: from dev.example.com (unknown [69.28.224.181])
by dev.example.com (Postfix) with ESMTPSA id A0CCEA0238
for masghar@example.com; Fri, 12 Oct 2018 10:49:34 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=example.com;
s=default; t=1539355774;
bh=WoRpXkhNls8oH5aamGp+VSmWBDHmaE/JPV+yE6Qzkis=; l=529;
h=From:To:Subject;
b=GdSlVJsLDj0qSOKQUBSvihVAZB50IgQe1pd/E+1gDO+/tSk79lNx2lPsI4SJPh2if
vtVFtX9c1pLP7PztQqCtEK0d7EkZTE56LXQrBh6X02yEiGbVFFUswn07LkPvJNLurF
cWMdR9lwR75Gj3DG6SGa4rt7/SmaLOthFA4kLIvw=
X-Mailer: Cypht
MIME-Version: 1.0
From: masghar@example.com
Reply-To: @example.com
To: malik.asghar.bubak@gmail.com
Subject: Email for Raw Content Check
Date: Fri, 12 Oct 2018 14:49:34 +0000
Message-Id: e79156a65b8a8380767ed2d9180dca7e@dev.example.com
Content-Type: multipart/alternative;
boundary=YicmdLnKqEcKN6H0KaPcpSUyaMsSGmuHA6Cx5HRJZxtUBTqd2bpYYKmTRe6UmYlf
X-Auto-Bcc: cypht
X-PPP-Message-ID: 20181012144934.20234.38363@dev.example.com
X-PPP-Vhost: example.com

--YicmdLnKqEcKN6H0KaPcpSUyaMsSGmuHA6Cx5HRJZxtUBTqd2bpYYKmTRe6UmYlf
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable

This is email for checking RAW content of the email=2E

--YicmdLnKqEcKN6H0KaPcpSUyaMsSGmuHA6Cx5HRJZxtUBTqd2bpYYKmTRe6UmYlf
Content-Type: text/html; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable

This is email for checking RAW content of the email=2E

<!-- gh-comment-id:429353522 --> @malik-asghar commented on GitHub (Oct 12, 2018): > > Great @jasonmunro . The issue is solved, and now SMTP is working fine. There is another issue, I have replied back to that email, when I clicked on Reply in receiver filed there was just my **Outbound E-mail Domain "example.com" where as there should [user@example.com](mailto:user@example.com)**. > > Secondly I did not received replied email. > > To check IMAP I just compose Email to [user@example.com](mailto:user@example.com) and I received that email. But first email which was reply is missing. I have got notification of Email received but it is not showing anywhere. > > @malik-asghar can you provide me with the raw content of the first E-mail, the one you then tried to reply to? You can get that by opening the message in Cypht and clicking on the "Raw" link below the headers. I think the problem is with the original message not the reply logic. Thanks! Yeah sure. Here it is: Authentication-Results: dev.example.com; dkim=temperror header.i=masghar@example.com Return-Path: <masghar@example.com> X-Original-To: masghar@example.com Delivered-To: masghar@example.com Received: from dev.example.com (unknown [69.28.224.181]) by dev.example.com (Postfix) with ESMTPSA id A0CCEA0238 for <masghar@example.com>; Fri, 12 Oct 2018 10:49:34 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=example.com; s=default; t=1539355774; bh=WoRpXkhNls8oH5aamGp+VSmWBDHmaE/JPV+yE6Qzkis=; l=529; h=From:To:Subject; b=GdSlVJsLDj0qSOKQUBSvihVAZB50IgQe1pd/E+1gDO+/tSk79lNx2lPsI4SJPh2if vtVFtX9c1pLP7PztQqCtEK0d7EkZTE56LXQrBh6X02yEiGbVFFUswn07LkPvJNLurF cWMdR9lwR75Gj3DG6SGa4rt7/SmaLOthFA4kLIvw= X-Mailer: Cypht MIME-Version: 1.0 From: <masghar@example.com> Reply-To: @example.com To: <malik.asghar.bubak@gmail.com> Subject: Email for Raw Content Check Date: Fri, 12 Oct 2018 14:49:34 +0000 Message-Id: <e79156a65b8a8380767ed2d9180dca7e@dev.example.com> Content-Type: multipart/alternative; boundary=YicmdLnKqEcKN6H0KaPcpSUyaMsSGmuHA6Cx5HRJZxtUBTqd2bpYYKmTRe6UmYlf X-Auto-Bcc: cypht X-PPP-Message-ID: <20181012144934.20234.38363@dev.example.com> X-PPP-Vhost: example.com --YicmdLnKqEcKN6H0KaPcpSUyaMsSGmuHA6Cx5HRJZxtUBTqd2bpYYKmTRe6UmYlf Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable This is email for checking RAW content of the email=2E --YicmdLnKqEcKN6H0KaPcpSUyaMsSGmuHA6Cx5HRJZxtUBTqd2bpYYKmTRe6UmYlf Content-Type: text/html; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable This is email for checking RAW content of the email=2E
Author
Owner

@malik-asghar commented on GitHub (Oct 12, 2018):

Great @jasonmunro . The issue is solved, and now SMTP is working fine. There is another issue, I have replied back to that email, when I clicked on Reply in receiver filed there was just my Outbound E-mail Domain "example.com" where as there should user@example.com.
Secondly I did not received replied email.
To check IMAP I just compose Email to user@example.com and I received that email. But first email which was reply is missing. I have got notification of Email received but it is not showing anywhere.

@malik-asghar can you provide me with the raw content of the first E-mail, the one you then tried to reply to? You can get that by opening the message in Cypht and clicking on the "Raw" link below the headers. I think the problem is with the original message not the reply logic. Thanks!

Yeah sure. Here it is:

Authentication-Results: dev.example.com;
dkim=temperror header.i=masghar@example.com
Return-Path: masghar@example.com
X-Original-To: masghar@example.com
Delivered-To: masghar@example.com
Received: from dev.example.com (unknown [69.28.224.181])
by dev.example.com (Postfix) with ESMTPSA id A0CCEA0238
for masghar@example.com; Fri, 12 Oct 2018 10:49:34 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=example.com;
s=default; t=1539355774;
bh=WoRpXkhNls8oH5aamGp+VSmWBDHmaE/JPV+yE6Qzkis=; l=529;
h=From:To:Subject;
b=GdSlVJsLDj0qSOKQUBSvihVAZB50IgQe1pd/E+1gDO+/tSk79lNx2lPsI4SJPh2if
vtVFtX9c1pLP7PztQqCtEK0d7EkZTE56LXQrBh6X02yEiGbVFFUswn07LkPvJNLurF
cWMdR9lwR75Gj3DG6SGa4rt7/SmaLOthFA4kLIvw=
X-Mailer: Cypht
MIME-Version: 1.0
From: masghar@example.com
Reply-To: @example.com
To: malik.asghar.bubak@gmail.com
Subject: Email for Raw Content Check
Date: Fri, 12 Oct 2018 14:49:34 +0000
Message-Id: e79156a65b8a8380767ed2d9180dca7e@dev.example.com
Content-Type: multipart/alternative;
boundary=YicmdLnKqEcKN6H0KaPcpSUyaMsSGmuHA6Cx5HRJZxtUBTqd2bpYYKmTRe6UmYlf
X-Auto-Bcc: cypht
X-PPP-Message-ID: 20181012144934.20234.38363@dev.example.com
X-PPP-Vhost: example.com

--YicmdLnKqEcKN6H0KaPcpSUyaMsSGmuHA6Cx5HRJZxtUBTqd2bpYYKmTRe6UmYlf
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable

This is email for checking RAW content of the email=2E

--YicmdLnKqEcKN6H0KaPcpSUyaMsSGmuHA6Cx5HRJZxtUBTqd2bpYYKmTRe6UmYlf
Content-Type: text/html; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable

This is email for checking RAW content of the email=2E

Got it. It is due to Profile Settings. I have to create profile. But Is there anyway that there should be option in hm3.ini file for Creating default profile when installing Cypht. Like there are options for IMAP and SMTP, there should be Option to create Profile and in this profile IMAP and SMTP should be set for default profile. It will be more useful and it will save time.

<!-- gh-comment-id:429361480 --> @malik-asghar commented on GitHub (Oct 12, 2018): > > > Great @jasonmunro . The issue is solved, and now SMTP is working fine. There is another issue, I have replied back to that email, when I clicked on Reply in receiver filed there was just my **Outbound E-mail Domain "example.com" where as there should [user@example.com](mailto:user@example.com)**. > > > Secondly I did not received replied email. > > > To check IMAP I just compose Email to [user@example.com](mailto:user@example.com) and I received that email. But first email which was reply is missing. I have got notification of Email received but it is not showing anywhere. > > > > > > @malik-asghar can you provide me with the raw content of the first E-mail, the one you then tried to reply to? You can get that by opening the message in Cypht and clicking on the "Raw" link below the headers. I think the problem is with the original message not the reply logic. Thanks! > > Yeah sure. Here it is: > > Authentication-Results: dev.example.com; > dkim=temperror header.i=[masghar@example.com](mailto:masghar@example.com) > Return-Path: [masghar@example.com](mailto:masghar@example.com) > X-Original-To: [masghar@example.com](mailto:masghar@example.com) > Delivered-To: [masghar@example.com](mailto:masghar@example.com) > Received: from dev.example.com (unknown [69.28.224.181]) > by dev.example.com (Postfix) with ESMTPSA id A0CCEA0238 > for [masghar@example.com](mailto:masghar@example.com); Fri, 12 Oct 2018 10:49:34 -0400 (EDT) > DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=example.com; > s=default; t=1539355774; > bh=WoRpXkhNls8oH5aamGp+VSmWBDHmaE/JPV+yE6Qzkis=; l=529; > h=From:To:Subject; > b=GdSlVJsLDj0qSOKQUBSvihVAZB50IgQe1pd/E+1gDO+/tSk79lNx2lPsI4SJPh2if > vtVFtX9c1pLP7PztQqCtEK0d7EkZTE56LXQrBh6X02yEiGbVFFUswn07LkPvJNLurF > cWMdR9lwR75Gj3DG6SGa4rt7/SmaLOthFA4kLIvw= > X-Mailer: Cypht > MIME-Version: 1.0 > From: [masghar@example.com](mailto:masghar@example.com) > Reply-To: @example.com > To: [malik.asghar.bubak@gmail.com](mailto:malik.asghar.bubak@gmail.com) > Subject: Email for Raw Content Check > Date: Fri, 12 Oct 2018 14:49:34 +0000 > Message-Id: [e79156a65b8a8380767ed2d9180dca7e@dev.example.com](mailto:e79156a65b8a8380767ed2d9180dca7e@dev.example.com) > Content-Type: multipart/alternative; > boundary=YicmdLnKqEcKN6H0KaPcpSUyaMsSGmuHA6Cx5HRJZxtUBTqd2bpYYKmTRe6UmYlf > X-Auto-Bcc: cypht > X-PPP-Message-ID: [20181012144934.20234.38363@dev.example.com](mailto:20181012144934.20234.38363@dev.example.com) > X-PPP-Vhost: example.com > > --YicmdLnKqEcKN6H0KaPcpSUyaMsSGmuHA6Cx5HRJZxtUBTqd2bpYYKmTRe6UmYlf > Content-Type: text/plain; charset=UTF-8; format=flowed > Content-Transfer-Encoding: quoted-printable > > This is email for checking RAW content of the email=2E > > --YicmdLnKqEcKN6H0KaPcpSUyaMsSGmuHA6Cx5HRJZxtUBTqd2bpYYKmTRe6UmYlf > Content-Type: text/html; charset=UTF-8; format=flowed > Content-Transfer-Encoding: quoted-printable > > This is email for checking RAW content of the email=2E Got it. It is due to Profile Settings. I have to create profile. But Is there anyway that **there should be option in hm3.ini file for Creating default profile when installing Cypht**. Like there are options for IMAP and SMTP, there should be Option to create Profile and in this profile IMAP and SMTP should be set for default profile. It will be more useful and it will save time.
Author
Owner

@jasonmunro commented on GitHub (Oct 12, 2018):

Reply-To: @example.com

This is a bug and needs to be fixed since it's an invalid E-mail header. You should be able to properly send mail even without a profile being setup.

Got it. It is due to Profile Settings. I have to create profile. But Is there anyway that there should be option in hm3.ini file for Creating default profile when installing Cypht. Like there are options for IMAP and SMTP, there should be Option to create Profile and in this profile IMAP and SMTP should be set for default profile. It will be more useful and it will save time.

We don't have any support for that unfortunately, but it's a good idea. I will open a new issue for this feature request.

<!-- gh-comment-id:429386354 --> @jasonmunro commented on GitHub (Oct 12, 2018): > Reply-To: @example.com This is a bug and needs to be fixed since it's an invalid E-mail header. You should be able to properly send mail even without a profile being setup. > Got it. It is due to Profile Settings. I have to create profile. But Is there anyway that there should be option in hm3.ini file for Creating default profile when installing Cypht. Like there are options for IMAP and SMTP, there should be Option to create Profile and in this profile IMAP and SMTP should be set for default profile. It will be more useful and it will save time. We don't have any support for that unfortunately, but it's a good idea. I will open a new issue for this feature request.
Author
Owner

@jasonmunro commented on GitHub (Oct 12, 2018):

There is one more thing, and your guidance will be appreciated.
I want to hide

  1. Logout Option from Menu
  2. Settings
  3. All options related to Settings like Home, Servers, Site, Profiles, Folders
  4. Carrot Icon
  5. Reload Link

when using Functional Login.

@malik-asghar Ok, here is what you need to do:

  1. Grab the latest master branch (I found a bug putting this together and fixed it)
  2. enable the site module set in your hm3.ini file
  3. replace modules/site/setup.php with this code:
<?php

if (!defined('DEBUG_MODE')) { die(); }

handler_source('site');
output_source('site');

/* these will disable the links and the settings section */
replace_module('output', 'settings_menu_start', false, 'ajax_hm_folders');
replace_module('output', 'settings_menu_end', false, 'ajax_hm_folders');
replace_module('output', 'logout_menu_item', false, 'ajax_hm_folders');
replace_module('output', 'settings_servers_link', false, 'ajax_hm_folders');
replace_module('output', 'settings_site_link', false, 'ajax_hm_folders');
replace_module('output', 'settings_save_link', false, 'ajax_hm_folders');
replace_module('output', 'home_link', false, 'ajax_hm_folders');
replace_module('output', 'change_password_link', false, 'ajax_hm_folders');
replace_module('output', 'create_account_link', false, 'ajax_hm_folders');
replace_module('output', 'profile_page_link', false, 'ajax_hm_folders');
replace_module('output', 'folders_page_link', false, 'ajax_hm_folders');
replace_module('output', 'pgp_settings_link', false, 'ajax_hm_folders');
replace_module('output', 'developer_doc_link', false, 'ajax_hm_folders');
replace_module('output', 'shortcuts_page_link', false, 'ajax_hm_folders');
replace_module('output', 'shortcuts_page_link', false, 'ajax_hm_folders');
replace_module('output', 'info_page_link', false, 'ajax_hm_folders');
replace_module('output', 'folder_list_content_end', false, 'ajax_hm_folders');

/* these will disable manual navigation to the pages linked to above */
add_handler('servers', 'disable_page', true, 'site', 'load_user_data', 'after');
add_handler('settings', 'disable_page', true, 'site', 'load_user_data', 'after');
add_handler('save', 'disable_page', true, 'site', 'load_user_data', 'after');
add_handler('home', 'disable_page', true, 'site', 'load_user_data', 'after');
add_handler('change_password', 'disable_page', true, 'site', 'load_user_data', 'after');
add_handler('accounts', 'disable_page', true, 'site', 'load_user_data', 'after');
add_handler('folders', 'disable_page', true, 'site', 'load_user_data', 'after');
add_handler('pgp', 'disable_page', true, 'site', 'load_user_data', 'after');
add_handler('dev', 'disable_page', true, 'site', 'load_user_data', 'after');
add_handler('shortcuts', 'disable_page', true, 'site', 'load_user_data', 'after');
add_handler('profiles', 'disable_page', true, 'site', 'load_user_data', 'after');
add_handler('info', 'disable_page', true, 'site', 'load_user_data', 'after');

/* allowed input */
return array(
    'allowed_pages' => array(),
    'allowed_cookie' => array(),
    'allowed_server' => array(),
    'allowed_get' => array(),
    'allowed_post' => array()
);
  1. replace modules/site/modules.php with this code:
<?php

/**
 * example site modules
 * @package modules
 * @subpackage site
 */

if (!defined('DEBUG_MODE')) { die(); }

/**
 * @subpackage site/handler
 */
class Hm_Handler_disable_page extends Hm_Handler_Module {
    public function process() {
        Hm_Dispatch::page_redirect('?page=message_list&list_path=unread');
    }
}

  1. Re-run the config_gen.php script.

Let me know if you run into any problems!

<!-- gh-comment-id:429388976 --> @jasonmunro commented on GitHub (Oct 12, 2018): > There is one more thing, and your guidance will be appreciated. > I want to hide > > 1. Logout Option from Menu > 2. Settings > 3. All options related to Settings like Home, Servers, Site, Profiles, Folders > 4. Carrot Icon > 5. Reload Link > > when using Functional Login. @malik-asghar Ok, here is what you need to do: 1. Grab the latest master branch (I found a bug putting this together and fixed it) 2. enable the site module set in your hm3.ini file 3. replace modules/site/setup.php with this code: ``` <?php if (!defined('DEBUG_MODE')) { die(); } handler_source('site'); output_source('site'); /* these will disable the links and the settings section */ replace_module('output', 'settings_menu_start', false, 'ajax_hm_folders'); replace_module('output', 'settings_menu_end', false, 'ajax_hm_folders'); replace_module('output', 'logout_menu_item', false, 'ajax_hm_folders'); replace_module('output', 'settings_servers_link', false, 'ajax_hm_folders'); replace_module('output', 'settings_site_link', false, 'ajax_hm_folders'); replace_module('output', 'settings_save_link', false, 'ajax_hm_folders'); replace_module('output', 'home_link', false, 'ajax_hm_folders'); replace_module('output', 'change_password_link', false, 'ajax_hm_folders'); replace_module('output', 'create_account_link', false, 'ajax_hm_folders'); replace_module('output', 'profile_page_link', false, 'ajax_hm_folders'); replace_module('output', 'folders_page_link', false, 'ajax_hm_folders'); replace_module('output', 'pgp_settings_link', false, 'ajax_hm_folders'); replace_module('output', 'developer_doc_link', false, 'ajax_hm_folders'); replace_module('output', 'shortcuts_page_link', false, 'ajax_hm_folders'); replace_module('output', 'shortcuts_page_link', false, 'ajax_hm_folders'); replace_module('output', 'info_page_link', false, 'ajax_hm_folders'); replace_module('output', 'folder_list_content_end', false, 'ajax_hm_folders'); /* these will disable manual navigation to the pages linked to above */ add_handler('servers', 'disable_page', true, 'site', 'load_user_data', 'after'); add_handler('settings', 'disable_page', true, 'site', 'load_user_data', 'after'); add_handler('save', 'disable_page', true, 'site', 'load_user_data', 'after'); add_handler('home', 'disable_page', true, 'site', 'load_user_data', 'after'); add_handler('change_password', 'disable_page', true, 'site', 'load_user_data', 'after'); add_handler('accounts', 'disable_page', true, 'site', 'load_user_data', 'after'); add_handler('folders', 'disable_page', true, 'site', 'load_user_data', 'after'); add_handler('pgp', 'disable_page', true, 'site', 'load_user_data', 'after'); add_handler('dev', 'disable_page', true, 'site', 'load_user_data', 'after'); add_handler('shortcuts', 'disable_page', true, 'site', 'load_user_data', 'after'); add_handler('profiles', 'disable_page', true, 'site', 'load_user_data', 'after'); add_handler('info', 'disable_page', true, 'site', 'load_user_data', 'after'); /* allowed input */ return array( 'allowed_pages' => array(), 'allowed_cookie' => array(), 'allowed_server' => array(), 'allowed_get' => array(), 'allowed_post' => array() ); ``` 4. replace modules/site/modules.php with this code: ``` <?php /** * example site modules * @package modules * @subpackage site */ if (!defined('DEBUG_MODE')) { die(); } /** * @subpackage site/handler */ class Hm_Handler_disable_page extends Hm_Handler_Module { public function process() { Hm_Dispatch::page_redirect('?page=message_list&list_path=unread'); } } ``` 5. Re-run the config_gen.php script. Let me know if you run into any problems!
Author
Owner

@jasonmunro commented on GitHub (Oct 12, 2018):

Reply-To: @example.com

This is a bug and needs to be fixed since it's an invalid E-mail header. You should be able to properly send mail even without a profile being setup.

Got it. It is due to Profile Settings. I have to create profile. But Is there anyway that there should be option in hm3.ini file for Creating default profile when installing Cypht. Like there are options for IMAP and SMTP, there should be Option to create Profile and in this profile IMAP and SMTP should be set for default profile. It will be more useful and it will save time.

We don't have any support for that unfortunately, but it's a good idea. I will open a new issue for this feature request.

@malik-asghar a fix for this is pushed to the master branch. Make sure you have default_email_domain set in your hm3.ini file.

<!-- gh-comment-id:429394324 --> @jasonmunro commented on GitHub (Oct 12, 2018): > > Reply-To: @example.com > > This is a bug and needs to be fixed since it's an invalid E-mail header. You should be able to properly send mail even without a profile being setup. > > > Got it. It is due to Profile Settings. I have to create profile. But Is there anyway that there should be option in hm3.ini file for Creating default profile when installing Cypht. Like there are options for IMAP and SMTP, there should be Option to create Profile and in this profile IMAP and SMTP should be set for default profile. It will be more useful and it will save time. > > We don't have any support for that unfortunately, but it's a good idea. I will open a new issue for this feature request. @malik-asghar a fix for this is pushed to the master branch. Make sure you have default_email_domain set in your hm3.ini file.
Author
Owner

@malik-asghar commented on GitHub (Oct 15, 2018):

Reply-To: @example.com

This is a bug and needs to be fixed since it's an invalid E-mail header. You should be able to properly send mail even without a profile being setup.

Got it. It is due to Profile Settings. I have to create profile. But Is there anyway that there should be option in hm3.ini file for Creating default profile when installing Cypht. Like there are options for IMAP and SMTP, there should be Option to create Profile and in this profile IMAP and SMTP should be set for default profile. It will be more useful and it will save time.

We don't have any support for that unfortunately, but it's a good idea. I will open a new issue for this feature request.

@malik-asghar a fix for this is pushed to the master branch. Make sure you have default_email_domain set in your hm3.ini file.

It is working fine now. Thanks.

<!-- gh-comment-id:429678335 --> @malik-asghar commented on GitHub (Oct 15, 2018): > > > Reply-To: @example.com > > > > > > This is a bug and needs to be fixed since it's an invalid E-mail header. You should be able to properly send mail even without a profile being setup. > > > Got it. It is due to Profile Settings. I have to create profile. But Is there anyway that there should be option in hm3.ini file for Creating default profile when installing Cypht. Like there are options for IMAP and SMTP, there should be Option to create Profile and in this profile IMAP and SMTP should be set for default profile. It will be more useful and it will save time. > > > > > > We don't have any support for that unfortunately, but it's a good idea. I will open a new issue for this feature request. > > @malik-asghar a fix for this is pushed to the master branch. Make sure you have default_email_domain set in your hm3.ini file. It is working fine now. Thanks.
Author
Owner

@malik-asghar commented on GitHub (Oct 15, 2018):

  • Logout Option from Menu
  • Settings
  • All options related to Settings like Home, Servers, Site, Profiles, Folders
  • Carrot Icon
  • Reload Link

Great @jasonmunro it is fixed and Now Cypht looking awesome when Embedded in any System.

<!-- gh-comment-id:429681127 --> @malik-asghar commented on GitHub (Oct 15, 2018): > * Logout Option from Menu > * Settings > * All options related to Settings like Home, Servers, Site, Profiles, Folders > * Carrot Icon > * Reload Link Great @jasonmunro it is fixed and Now Cypht looking awesome when Embedded in any System.
Author
Owner

@malik-asghar commented on GitHub (Oct 15, 2018):

Reply-To: @example.com

This is a bug and needs to be fixed since it's an invalid E-mail header. You should be able to properly send mail even without a profile being setup.

Got it. It is due to Profile Settings. I have to create profile. But Is there anyway that there should be option in hm3.ini file for Creating default profile when installing Cypht. Like there are options for IMAP and SMTP, there should be Option to create Profile and in this profile IMAP and SMTP should be set for default profile. It will be more useful and it will save time.

We don't have any support for that unfortunately, but it's a good idea. I will open a new issue for this feature request.

It is very useful when you are embedding Cypht in any system. I will be waiting for this update. Thanks

<!-- gh-comment-id:429687742 --> @malik-asghar commented on GitHub (Oct 15, 2018): > > Reply-To: @example.com > > This is a bug and needs to be fixed since it's an invalid E-mail header. You should be able to properly send mail even without a profile being setup. > > > Got it. It is due to Profile Settings. I have to create profile. But Is there anyway that there should be option in hm3.ini file for Creating default profile when installing Cypht. Like there are options for IMAP and SMTP, there should be Option to create Profile and in this profile IMAP and SMTP should be set for default profile. It will be more useful and it will save time. > > We don't have any support for that unfortunately, but it's a good idea. I will open a new issue for this feature request. It is very useful when you are embedding Cypht in any system. I will be waiting for this update. Thanks
Author
Owner

@jasonmunro commented on GitHub (Oct 17, 2018):

@malik-asghar I created a new issue for default profiles here: https://github.com/jasonmunro/cypht/issues/293 It's easier for me to keep track of things if issues are limited to a single thing :). I think everything else brought up in this thread is resolved so I'm going to close it. If there is something else besides default profile support that is not resolved, please open a new issue for it. Thanks!

<!-- gh-comment-id:430691103 --> @jasonmunro commented on GitHub (Oct 17, 2018): @malik-asghar I created a new issue for default profiles here: https://github.com/jasonmunro/cypht/issues/293 It's easier for me to keep track of things if issues are limited to a single thing :). I think everything else brought up in this thread is resolved so I'm going to close it. If there is something else besides default profile support that is not resolved, please open a new issue for it. Thanks!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cypht#251
No description provided.