156K Views

How to set up SMTP/IMAP in Open Source Helpdesk – UVdesk?

SMTP/IMAP Configuration

For sending or transfer emails through your support email id and fetch emails over Helpdesk, you have to set mailer SMTP and IMAP.

What is Mailbox?

Mailbox allows all the e-mails sent to your specified e-mail address to be automatically imported as the support ticket in your helpdesk system. Now the owner or the agent can manage inquiries in a much better way using helpdesk features and tools.

Here i am drafting out few configuration steps to automatically convert your emails into the support ticket in the UVdesk.

Video Tutorial

Swift Mailer Configuration

Step 1– When you will go to the dashboard, you will see “Swift Mailer” icon under setting section.

Swift Mailer UVdesk Helpdesk

Step 2 – Now, just click on “Swift Mailer” and hit on “Create Configuration” button.

Step 3 – Need to fill out all below details and proceed with by clicking “save changes” button.

  • Swift Mailer Id: Enter mailer Id name which will further use while creating mailbox.
  • Transport Type: Name of transport method used to deliver email e.g, SMTP (for Yahoo)
  • Enable Delivery: Click on check box to enable swift mailer.
  • Server: SMTP server used for outgoing mails e.g, smtp.mail.yahoo.com (for Yahoo)
  • Email: Here you need to enter your support email Id which you want to configure with UVdesk.
  • Password: Enter the password for same email Id which you have entered.
  • Port: The SMTP port of your server e.g, 465 (for Yahoo)
  • Encryption Mode: Select encryption mode as SSL, TLS or None as required from the drop down as required.
  • Authentication Mode: Select authentication mode as Login, Plain or Cram-MD5 from the drop down.
  • Sender Address:  All email will be delivered with this address as the “return path” address, which is where bounced email should go.
  • Delivery Address:All email messages will be sent to this address instead of being sent to their actual recipients

Swift mailer update configuration

Mailbox Configuration

Step 1 – Next step is to click on “Mailbox” option under settings.

UVdesk mailbox

Step 2 – Now, just click on “New Mailox” button.

Step 3 – Need to fill out all below details and proceed with by clicking “Proceed” button.

  • Id: Enter the name of mailbox
  • Name: Enter the Correspondents or Sender name

Incoming Mail (IMAP) Server

  • Transport: Select transport as Gmail, Yahoo or IMAP
  • Host: Every email service has unique IMAP HOST like Gmail – {imap.gmail.com:993/imap/ssl}INBOX, Yahoo – {imap.mail.yahoo.com:993/imap/ssl}INBOX
  • Email: Put email address of IMAP(incoming mail server)
  • Password: Enter password of given email.

Outgoing Mail (SMTP) Server

  • Swift Mailer ID: Select created swiftmailer id from the drop down

Email Settings

Email settings is use to send the reply from ticket panel to the customer email id hence this setting is mandatory. To do this, directly go to email settings by navigating through  Settings-> Email Settings 

Now fill the required details Email Id, Name, Swiftmailer id and Proceed.

  • Email Id: This email address sends ticket reply to your customer email id.
  • Name: Enter any name for identification.
  • Swiftmailer Id: Select switfmailer id from the drop down.


Email settings

 

Note: Now, need to edit few changes in code, navigate through config->packages->uvdesk.yaml  and find site_url, enter the localhost or domain path till public, make sure you have removed http://

For example: localhost/folder_name/public

Run Cron Job

Run below refresh command through terminal into project root directory to fetch emails as a tickets.

Run Cron Job

Schedule Cron Job that needs to be executed repeatedly (e.g., hourly, daily, or weekly), you can use the crontabcommand. for more details refer to this guide.

Common Issues:

If you are getting the error “Can not authenticate to IMAP server: [ALERT]

Make sure you have enabled the 2 step verification.

First sign in to the Gmail account in a browser on the device then, need to ensure that you have enabled IMAP status and also make sure the 2-step verification should be ON and have already done the continue step to allow access to your Google account.

To get know how you can enable the 2-step verification, follow the below-mentioned steps:

  1. Open google settings click on the manage your google account option and click on the security option:

  1. Now, Enable 2 steps verification:

3. Create an app password :

4. Now, click on the select app & choose the other option in the dropdown: 

5. Once your password has been generated, follow the steps mentioned below:

6. Now, you can use this code or password in place of a password in the swift mailer & mailbox settings.

Here we have done all the settings of mailbox configuration, now you can able to send and receive emails over the ticket panel.

If you’re not using Gmail, and would like to know the mailbox configuration with Outlook, refer this comprehensive user guide – Office 365 Outlook Mailbox Configuration In UVdesk Open Source Helpdesk

Support

That’s all for Mailbox Configuration. For any doubts or suggestions regarding the extension get back to us at support@uvdesk.com or raise a ticket at our Helpdesk system.

Category(s) UVdesk
. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


13 comments

  • Rob Pearce
    Solution:

    Attempted to call function “imap_open” from namespace “Webkul\UVDesk\MailboxBundle\Console”.

    We found a solution:

     I cant explain how this fixes the problem but it did seem to.

    despite PHP reporting that imap extension is installed and me confirming it works by running a test script in the browser it wasnt working on the command line. So,basically reinstalled imap and dependancy php-curl (See below the steps for Linux but i would imagine the same principle should work for Windows. The odd thing is those extensions were installed – so maybe it was an update that was required. my guess is the browser may be running php 7.3 (IMAP works for the browser) but the command line is using php 7.4 which didnt have imap and curl extensions installed. I ended up with two versions of php quite by accident – i dont know how 7.4 got on my server

    sudo apt install php-imap
    463 sudo phpenmod imap
    464 sudo apt update
    465 sudo apt
    467 sudo apt upgrade -y
    468 sudo reboot
    469 sudo apt update
    470 sudo apt upgrade
    471 sudo apt autoremove
    472 sudo reboot
    477 sudo add-apt-repository ppa:ondrej/php
    478 sudo apt-get update
    479 sudo apt-get install php-curl

    • Himani Gupta
      Hello Rob Pearce,
      Glad to know that your issue has been resolved.
      Keep stay & deliver better customer support with UVdesk open source Helpdesk.
      Thanks & Regards
      UVdesk Team
  • SudoBash
    This shouldn’t be set for using Gmail…

    It is extremely unprofessional to use gmail for SMTP/IMAP delivery and besides that, most companies have their own SMTP/IMAP servers or providers…

    Also, this information doesn’t work and if you copy and paste your YAML configs, it errors that it is in an incorrect format!

    • Himani Gupta
      Hello SudoBash,
      Nice day to you!!
      Kindly download the latest version of community helpdesk from here -https://github.com/uvdesk/community-skeleton/
      You can configured email settings by using the GUI. In the latest update there is no need to set up a backend configuration for the mailbox.
      The only thing which you need to update i.e Site_Url in Uvdesk.Yaml instead of default URL.
      Thank You!!
      • SudoBash
        I got that working and enabled SMTP through my provider.
        I can send a test email with:
        ./console swiftmailer:email:send –from user@domain.com –to user@domain.com –subject Test –body Test –mailer mailer_#

        I receive the Test email in my inbox almost immediately, but when I create a user agent or click forgot password, I get NO email…

        • Himani Gupta
          Hello SudoBash,
          Sounds great!!
          To enable user forget email notification you need to set up email settings first by navigating through Settings-> Email Settings
          Kindly make a try and update us if still exists by emailing us at support@uvdesk.com
          Thank You!!
  • Marice
    Hi I got this error

    1. Processing uvdesk mailbox configuration.

    Mailbox for email maricejuguilon@gmail.com not found.

    • Himani Gupta
      Hello Marice,
      Nice day to you!!
      Most probably this email is not configured with UVdesk Mailbox. To get verified refer this comprehensive user guide to set up UVdesk with Gmail – https://www.uvdesk.com/en/blog/setup-mailbox-uvdesk-open-source-helpdesk/
      Thanks & Regards
      UVdesk Team
      • Marice
        Thank you, it actually help, but I have another issue in saving the form I got this error
        Warning: mkdir(): Permission denied
        • Himani Gupta
          Hello Marice
          Kindly provide the read & write permission for config folder – chmod 777 -R path of config folder of UVdesk project
          Thanks & Regards
          UVdesk Team
  • Ovidiu
    Hi,

    I’m trying to setup a test environment and I cannot get new emails to trigger a ticket and sent notifications to customer and agents when I run manuall uvdesk: refresh-mailbox. For tickets created manually with New Ticket the replies are going fine.
    I’ve setup all swiftmailer.yaml, uvdesk.yaml, uvdesk-mailbox.yaml correctly, I think and cron job to fetch every 30 minutes.

    php /home/ovidiu/public_html/mmesupport/bin/console uvdesk:refresh-mailbox support@test.domain

    1. Processing uvdesk mailbox configuration.

    2. Opening imap stream…

    3. IMAP stream opened.

    4. Fetching Email collection since 30 September 2020.

    5. Total fetched email -> 8

    6. Starting to convert Emails into Tickets ->
    =============================================
    =============================================

    Converting email 1 out of 8.

    Converting email 2 out of 8.

    Converting email 3 out of 8.

    Converting email 4 out of 8.

    Converting email 5 out of 8.

    Converting email 6 out of 8.

    Converting email 7 out of 8.

    Converting email 8 out of 8.

    Mailbox refreshed successfully !!!

    Snippets from files:
    support_email:
    id: support@test.domain
    name: Support
    mailer_id: mailer_4923

    swiftmailer:
    default_mailer: mailer_4923
    mailers:
    mailer_4923:
    transport: smtp
    username: support@domain
    password: password
    host: hostntame.domain
    port: 587
    encryption: tls
    auth_mode: login
    sender_address: support@domain
    delivery_addresses: [”]
    disable_delivery: false
    spool: { type: ‘memory’ }
    stream_options:
    ssl:
    allow_self_signed: true
    verify_peer: false
    verify_peer_name: false

    uvdesk_mailbox:
    emails: ~
    # Often Reply emails like from gmail contains extra and redundant previous mail data.
    # This data can be removed by adding delimiter i.e. specific line before each reply.
    # delimiter: ”
    # enable_delimiter: true

    # Configure your mailboxes here
    mailboxes:
    mailbox_4123:
    name: Support
    enabled: true

    # [SMTP] Outgoing mail server
    # Swiftmailer smtp mailer to use for sending emails through on behalf of this mailbox
    smtp_server:
    mailer_id: mailer_4923

    # [IMAP] Incoming mail server
    # IMAP configurations to use for fetching emails from mailbox
    imap_server:
    host: ‘{hostname:993/imap/ssl}INBOX’
    username: support@domain
    password: password

    I don’t know what I’m missing and how I should debug this issue. Can you help ?

    Thank you!

  • css.php