Author Topic: How to bypass login page and landing to mails page directly from a php script  (Read 2709 times)

Offline mythri

  • Newbie
  • *
  • Posts: 6
Hello All,

I have installed roundcube to access emails. I have a small php application in which user creates an invoice after logging in, Once he selects email option it has to redirect directly to emails page of roundcube by taking that username and password from that application with that pdf attachment.

I tried , but couldn't get how to bypass it.

Can somebody please help me in this?

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,611
    • http://SKaero.com/
Look at the autologon plugin for an example of how to accept remote variables.

Offline mythri

  • Newbie
  • *
  • Posts: 6
Hey Thanks! I am able to do it. But after generating a pdf, i click on email from my script then it should go to compose mail section with the attachment in RC. How can i achieve this? . Plz do share if anybody knows any related thread or any suggestion for this

Thanks in advance

Offline mythri

  • Newbie
  • *
  • Posts: 6
Can somebody please look into it? Thank you

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,611
    • http://SKaero.com/
You can add attachments with the message_compose hook: http://trac.roundcube.net/wiki/Plugin_Hooks#message_compose

Offline mythri

  • Newbie
  • *
  • Posts: 6
Thanks, But can you please explain me a bit, how can i use it in the code? Is there any example or syntax i can refer. Please let me know. Its very urgent for me to do

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,611
    • http://SKaero.com/
Here is the official plugin documentation: http://trac.roundcube.net/wiki/Doc_Plugins its best to look at existing plugin for practical examples.

Offline mythri

  • Newbie
  • *
  • Posts: 6
Actually i am naive here. In this i understood that i need to write a new plugin for this. Please correct me if i am wrong. :-[

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,611
    • http://SKaero.com/
I can't think of a plugin that already exists that meets your needs, so I think you need to code a new plugin. However all the needed API exist so it shouldn't be to hard.

Offline mythri

  • Newbie
  • *
  • Posts: 6
Can you give me any hint that how i can do it?

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,611
    • http://SKaero.com/
What type of "hint" do you need? Reading the plugin documentation will tell you about structure of Roundcube plugins, then you can use the message_compose hook to add attachments to new emails.