Page 2 of 2

Re: Email sending after Call

PostPosted: Sat Mar 04, 2017 6:55 am
by mflorell
Thanks for posting your solution!

Re: Email sending after Call

PostPosted: Mon Mar 06, 2017 4:42 am
by roll72
Thanks for the reply. My question est from which version of vicidial the option in VICIdial Administrator section ---> Admin ---> Settings Container is available?

Re: Email sending after Call

PostPosted: Mon Mar 06, 2017 6:36 am
by mflorell
Settings Containers were added in August 2015(svn revision 2368) which would be admin.php version 2.12-505a and build 150806-1348.

Of course we would recommend upgrading to the latest svn/trunk to get security fixes and newer features.

Re: Email sending after Call

PostPosted: Thu Nov 16, 2017 3:24 pm
by hansg
I am trying to use this method but I am getting the following error when checking the URL log report:

Code: Select all
Thu, 16 Nov 2017 20:09:31 +0000|PHP ERROR: Type=2 - Message=file(varhttp://myip/agc/dispo_send_email.php?container_id=email&lead_id=3533071&call_id=M1162009060003533071&dispo=A&user=agent001&pass=pass1&sale_status=A&log_to_file=1): failed to open stream: No such file or directory - Line=11681 - File=/var/www/html/agc/vdc_db_query.php


Ive had a look at line 11681 and it's this:
Code: Select all
$SCUfile = file("$url");


Any idea what the problem is?

Re: Email sending after Call

PostPosted: Thu Nov 16, 2017 3:38 pm
by mflorell
Do you have "dispo_send_email.php" on your system?

Re: Email sending after Call

PostPosted: Thu Nov 16, 2017 4:16 pm
by hansg
yes in the same directory... /var/www/html/agc/dispo_send_email.php

Re: Email sending after Call

PostPosted: Thu Nov 16, 2017 4:43 pm
by williamconley


vs

VARhttp://192.168.1.100/agc/dispo_send_ ... _to_file=1

var vs VAR?

WAIT a minute:

Why are you sending the dispo url file as the message?

VARhttp://192.168.1.100/agc/dispo_send_ ... _to_file=1 goes in the DISPO_URL field of the campaign. That's not a file you're sending to the client.

Re: Email sending after Call

PostPosted: Thu Nov 16, 2017 5:16 pm
by hansg
I have the following settings...

Settings Container
Code: Select all
; destination email
email_to => Customer_Email ;;;;; (For Static Mail Recipient)
;email_to => --A--customer_email--B-- ;;;;; (To Mail ID of individual lead if available in database)

; sending email address
email_from => my_email
;email_from => --A--agent_email--B--

; subject of the email
email_subject => Order confirmation --A--vendor_lead_code--B--

; body of the email
email_body_begin =>
Hello --A--first_name--B--,

Good Day

You spoke to agent --A--fullname--B--.

Here is a summary of your account information:

lead_id: --A--lead_id--B--
vendor_id: --A--vendor_id--B--
vendor_lead_code: --A--vendor_lead_code--B--
list_id: --A--list_id--B--
list_name: --A--list_name--B--
list_description: --A--list_description--B--
gmt_offset_now: --A--gmt_offset_now--B--
phone_code: --A--phone_code--B--
phone_number: --A--phone_number--B--
title: --A--title--B--
first_name: --A--first_name--B--
middle_initial: --A--middle_initial--B--
last_name: --A--last_name--B--
address1: --A--address1--B--
address2: --A--address2--B--
address3: --A--address3--B--
city: --A--city--B--
state: --A--state--B--
province: --A--province--B--
postal_code: --A--postal_code--B--
country_code: --A--country_code--B--
gender: --A--gender--B--
date_of_birth: --A--date_of_birth--B--
alt_phone: --A--alt_phone--B--
email: --A--email--B--
security_phrase: --A--security_phrase--B--
comments: --A--comments--B--
user: --A--user--B--
closer: --A--user--B--
SQLdate: --A--SQLdate--B--
source_id: --A--source_id--B--
rank: --A--rank--B--
owner: --A--owner--B--
entry_list_id: --A--entry_list_id--B--
call_id: --A--call_id--B--
entry_date: --A--entry_date--B--
fullname: --A--fullname--B--
agent_email: --A--agent_email--B--
user_group: --A--user_group--B--

Have A Happy Day.

email_body_end


Dispo Call URL:

Code: Select all
VARhttp://myip/agc/dispo_send_email.php?container_id=email&lead_id=--A--lead_id--B--&call_id=--A--call_id--B--&dispo=--A--dispo--B--&user=--A--user--B--&pass=--A--pass--B--&sale_status=--A--dispo--B--&log_to_file=1

Re: Email sending after Call

PostPosted: Thu Nov 16, 2017 5:24 pm
by williamconley
Two questions:

1) Is it "var" or VAR"?

2) Is http://myip/agc/dispo_send_email.php a viable web page on your system from your DB server?

Test with wget at the CLI "wget http://myip/agc/dispo_send_email.php"

Re: Email sending after Call

PostPosted: Thu Nov 16, 2017 5:25 pm
by hansg
Okay so changing "var" to "VAR" has fixed the problem.

I can send emails to my microsoft email but not to my personal email domain.

The log says both emails have been send but t never arrives at my personal domain...

Re: Email sending after Call

PostPosted: Thu Nov 16, 2017 5:47 pm
by williamconley
Probably due to SPF or other security restrictions. Who hosts your personal email? (since your workstation is not likely a "host server" for email ...). It has to go to a server to await collection. The security rules in place at that mail host are likely blocking the mail. Fairly common.

Re: Email sending after Call

PostPosted: Thu Nov 16, 2017 6:27 pm
by hansg
My personal is hosted by fasthosts

Re: Email sending after Call

PostPosted: Thu Nov 16, 2017 6:39 pm
by williamconley
They most likely don't allow failed spf email. You'll need to modify the "from" email address to a domain name you own, and set the SPF record for that domain to include your Vicidial server so your server has permission to send email from that domain.

Or set it up to send through gmail or some other provider via paid smtp. Or set up a freebie account at a provider you *can* send to, and forward that to your personal email. Many ways to skin that cat.

Re: Email sending after Call

PostPosted: Thu Nov 16, 2017 6:45 pm
by hansg
Thanks for your help William.

I will sort something out one way or another.

Re: Email sending after Call

PostPosted: Thu Aug 12, 2021 8:08 pm
by marveelou
Thanks, @Acidshock, It worked!!!!Bravo