CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • CivicMailProcessor username/password
Pages: [1]

Author Topic: CivicMailProcessor username/password  (Read 2566 times)

rchapman

  • I post occasionally
  • **
  • Posts: 77
  • Karma: 0
CivicMailProcessor username/password
June 03, 2010, 09:10:17 am
Hello,

 I'm trying to follow the wiki instructions to set up the return handling, and I'm testing the civimailprocessing php file, but getting invalid username/password. Even though it is the exact same server login and api-key used to make the EmailProcessor function work.

 The solution seemed to have something to do with having entries in the api_key field in a civicrm_contact, but not sure if that needs to be coded, or just a straight password.


~r

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: CivicMailProcessor username/password
June 03, 2010, 09:44:54 am
Could it be the username/password for the email account? This is configured in CiviCRM Admin → CiviMail → Mail Accounts.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

rchapman

  • I post occasionally
  • **
  • Posts: 77
  • Karma: 0
Re: CivicMailProcessor username/password
June 04, 2010, 04:42:31 am
a good suggestion. but I'm going by the wiki at this address:

http://wiki.civicrm.org/confluence/display/CRMDOC/CiviMail+Processor

which quotes:

Quote
Once you do this, you can test whether the polling works by visiting CiviCRM-Resource-URL/bin/CiviMailProcessor.php?name=username&pass=password&key=key (with the bold parts replaced by your site's CiviCRM Resource URL, credentials pair of a user with CiviMail access and your site's key).

Which does not specify really, but says "of a user with CiviMail access".

Thanks, though.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: CivicMailProcessor username/password
June 04, 2010, 05:08:30 am
You are right that the cron job needs such credentials.

I was asking about a separate issue. If you properly configured the email account in CiviCRM Admin → CiviMail → Mail Accounts.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

rchapman

  • I post occasionally
  • **
  • Posts: 77
  • Karma: 0
Re: CivicMailProcessor username/password
June 04, 2010, 06:41:01 am
here's the really interesting this. I'm using the crontask Email Processor, which brings emails from the account in Mail Settings and turns them into contacts. That works fine, so I assume the mail settings are fine.

I'm stumped.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: CivicMailProcessor username/password
June 04, 2010, 06:46:13 am
Not sure, but to debug, perhaps try a different username/password combo--make one with the necessary rights
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: CivicMailProcessor username/password
June 07, 2010, 11:25:17 am
Quote from: rchapman on June 03, 2010, 09:10:17 am
I'm trying to follow the wiki instructions to set up the return handling, and I'm testing the civimailprocessing php file, but getting invalid username/password. Even though it is the exact same server login and api-key used to make the EmailProcessor function work.

First, what you need is username, password (of a Joomla user account able to access CiviMail) and CiviCRM site key triple. Second, if you call it with wget or curl make sure you quote the path in the shell (otherwise the ampersands in the URL will be interpreted as shell ‘and’ operators).
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

rchapman

  • I post occasionally
  • **
  • Posts: 77
  • Karma: 0
Re: CivicMailProcessor username/password
June 09, 2010, 07:31:39 am
Thanks Piotr for the help. I guess my question is what "able to access CiviMail" is? We use civimail, but it's possible I haven't set up the users properly, and I'm having a hard time finding any more information. Any suggestions on where I set 'access to civimail'?

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: CivicMailProcessor username/password
June 10, 2010, 03:51:02 am
Quote from: rchapman on June 09, 2010, 07:31:39 am
I guess my question is what "able to access CiviMail" is?

In Joomla I think it means an account with access to the admin backend – i.e., a pair of credentials (username+password) which can be used to login to your CiviCRM instance and change CiviMail settings.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

pjindent

  • I post occasionally
  • **
  • Posts: 34
  • Karma: 2
Re: CivicMailProcessor username/password
June 11, 2010, 08:20:04 am
I am having similar issue in Drupal as I try to run civimail.cronjob.php or schedule the cronjob.

I have created
Drupal login account =  mailprocess
I have defined a new role called 'admin role'.  It has all CiviCRM permissions.
Specifically, it has access to CiviCRM. With this account I am able to edit CiviMail -> Mail Accounts
This drupal is running under sites/default/

In Shell, I have run:
php public_html/sites/all/modules/civicrm/bin/civimail.cronjob.php -sdefault -umailprocess -pmypassword

I get error:  ERROR: You need to send a valid user name and password to execute this file

I have tried it with Drupal's admin user and same result.

What am I missing?

The cronjob has also been scheduled and i get back an email with similar error:
X-Powered-By: PHP/5.2.9
Set-Cookie: PHPSESSID=9e63a4f9c1324c3e246f5c9115632c51; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-type: text/html

ERROR: You need to send a valid user name and password to execute this file


xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: CivicMailProcessor username/password
June 11, 2010, 08:32:49 am
Hi,

Some differences with how I use it :

1) I run it from the civicrm folder:
cd /public_html/site/all/modules;php bin/civimail.cronjob.php

2) Is you config for civicrm set in /sites/default or another one ?
I put my config into sites/www.example.org, hence -swww.example.org

3) I have a settings_location.php in the civicrm folder.

Is any of these useful ?

How, and unrelated to your server but good, run as nice -19 php  instead of php

Lastly, you might want to read The book, available in all the good libraries for a very low price and free at the nearest interweb: http://en.flossmanuals.net/CiviCRM/SystemConfiguration

Hopefully more detailed than the wiki ?

-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

rchapman

  • I post occasionally
  • **
  • Posts: 77
  • Karma: 0
Re: CivicMailProcessor username/password
June 11, 2010, 10:37:08 am
interestingly, I tried running the crontask instead of testing the URL first. That went fine. No error. So why would using the URL result in 'invalid user' when the shell wouldn't? Oh well. Now I know it's working at least.

~r

pjindent

  • I post occasionally
  • **
  • Posts: 34
  • Karma: 2
Re: CivicMailProcessor username/password
June 11, 2010, 11:18:14 am
Thanks Xavier for your note.

The paths are fine and I am running from default.

I do not have settings_location.php.  Let me know if this is required.

The only way I have got the mass email and bounce processing to work is with
wget command

wget -O - -q -t 1 --post-data='name=mailprocess&pass=seol-lzprm42amvpsyc&key=yoursiteinstallkey' http://www.example.org/sites/all/modules/civicrm/bin/civimail.cronjob.php

wget -O - -q -t 1 --post-data='name=mailprocess&pass=seol-lzprm42amv-psyc&key=yoursiteinstallkey' http://www.example.org/sites/all/modules/civicrm/bin/EmailProcessor.php

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • CivicMailProcessor username/password

This forum was archived on 2017-11-26.