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) »
  • SMTP Outbound Mail - nothing goes anywhere - ideas ?
Pages: [1]

Author Topic: SMTP Outbound Mail - nothing goes anywhere - ideas ?  (Read 6407 times)

Denver Dave

  • Ask me questions
  • ****
  • Posts: 471
  • Karma: 9
SMTP Outbound Mail - nothing goes anywhere - ideas ?
November 02, 2007, 10:34:51 pm
I'm just starting to experiment with CiviMail.  When I send out mail, including the test email message, I'm not receiving any errors and it seems like the test message is going out, but nothing is received by me.  Any ideas where to start tracking this down. 

The smtp settings seem to be correct, but is there a way to test this?  I can send from my PC email client with the settings.  Seems like an error email should come back someplace.

I'm on a virtual host and I've always used php sendmail() before, never tried to send from a server application with smtp - could that be the issue?  Any way to test?

I haven't put the Cron files in place, would this effect the test message?  If I elect to send immediately, is this effected by the Cron file?

Thanks - any ideas or suggestions appreciated.

speleo

  • Ask me questions
  • ****
  • Posts: 396
  • Karma: 28
  • CiviCRM version: 4.3.1
  • CMS version: J! 2.5,9
  • MySQL version: 5.1
  • PHP version: 5.3.24
Re: SMTP Outbound Mail - nothing goes anywhere - ideas ?
November 03, 2007, 01:56:06 am
you need the cron job.

http://wiki.civicrm.org/confluence/display/CRMDOC/CiviMail+Installation#CiviMailInstallation-SettingUptheCronJob

"To have your mailing actually send, set up a cron job that will periodically poke CiviMail to send all of the mailings that are past their scheduled date"
« Last Edit: November 03, 2007, 01:58:19 am by speleo »

Denver Dave

  • Ask me questions
  • ****
  • Posts: 471
  • Karma: 9
Re: SMTP Outbound Mail - nothing goes anywhere - ideas ?
November 05, 2007, 10:47:58 am
Before going down the alternate configuration route, is there a way to determine if Amavis is available on my server?  Is Amavis an email virus scanner?

Examining the table civicrm_mailing, I have 4 entries in the table, but I'm not sure if they are the test emails, the broadcast emails or both.  I see a from email address, but not a to email address.  I wonder how this is determined.

- - -

Without the cron entry, shouldn't we be able to trigger it manually, just to see what happens?

When I mannually run from an html link in a html file in the directory with my name and password, this is the error that I get (also tried as php5 script - same error):
civimail.cronjob.php?name=civimailuser&pass=civimailuserpassword

Code: [Select]
Error Details:

Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    code => (square brackets removed)
    [message] => not connected
    [mode] => 16
    [debug_info] =>
    [type] => PEAR_Error
    [user_info] =>
    [to_string] => [pear_error: message="not connected" code=0 mode=callback callback=CRM_Core_Error::handle prefix="" info=""]
)

I'll search for pear_error.
« Last Edit: November 05, 2007, 11:18:01 am by Denver Dave »

phani

  • I’m new here
  • *
  • Posts: 28
  • Karma: 3
    • namahatta.org DB
Re: SMTP Outbound Mail - nothing goes anywhere - ideas ?
November 05, 2007, 12:05:56 pm
did you ask your host if they allow access to SMTP on their server? the last 3 shared hosting servers i worked with didn't.

Denver Dave

  • Ask me questions
  • ****
  • Posts: 471
  • Karma: 9
Re: SMTP Outbound Mail - nothing goes anywhere - ideas ?
November 05, 2007, 12:21:39 pm
Thanks - I'll go a head and submit the question to my host.  Is there a simple test to see if SMTP access is allowed.  Seems strange that a local client like outlook express can have smtp access, but my own server can't.   Maybe I'm missing the real issue.

I had submitted a request earlier today if anyone on the server has installed CiviCRM ... haven't heardback yet ... or actually even posted, so I submitted and asked if SMTP is allowed.

Would be a cruel if after getting Drupal installed, CiviCRM installed, CiviCRM available that could not use for emails to contacts, which was the basic requirement in the first place.
« Last Edit: November 05, 2007, 12:29:38 pm by Denver Dave »

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: SMTP Outbound Mail - nothing goes anywhere - ideas ?
November 05, 2007, 10:54:39 pm
Quote from: Denver Dave on November 02, 2007, 10:34:51 pm
I'm just starting to experiment with CiviMail.  When I send out mail, including the test email message, I'm not receiving any errors and it seems like the test message is going out, but nothing is received by me.  Any ideas where to start tracking this down.

Best – in your server’s logs, if you have access to them (might be not easy on a shared server).

Quote from: Denver Dave on November 02, 2007, 10:34:51 pm
I haven't put the Cron files in place, would this effect the test message?  If I elect to send immediately, is this effected by the Cron file?

Yes, as speleo mentioned, you need the cron entry. You can fake it for test purposes by going to a …mailing/queue URL, which should trigger the CiviMail queue sending.

Quote from: Denver Dave on November 05, 2007, 10:47:58 am
Before going down the alternate configuration route, is there a way to determine if Amavis is available on my server?  Is Amavis an email virus scanner?

It’s also a virus scanner, but in general it’s an email fitler we modified to work for CiviCRM’s return channel to handle stuff like sub-, unsub- and resubscribes, bounce handling, etc.

Quote from: Denver Dave on November 05, 2007, 10:47:58 am
Examining the table civicrm_mailing, I have 4 entries in the table, but I'm not sure if they are the test emails, the broadcast emails or both.  I see a from email address, but not a to email address.  I wonder how this is determined.

They’re entries for both kinds of mailings. The To: email address is determined once the sending queue is triggered; once the queue is triggered, temporary tables are created to build the contact list and the delivery results are put in the various civicrm_mailing_event_* tables.

Quote from: Denver Dave on November 05, 2007, 10:47:58 am
Without the cron entry, shouldn't we be able to trigger it manually, just to see what happens?

As mentioned above, try using a …mailing/queue URL.

Quote from: Denver Dave on November 05, 2007, 12:21:39 pm
Seems strange that a local client like outlook express can have smtp access, but my own server can't.   Maybe I'm missing the real issue.

Your error may mean that PHP can’t connect to the SMTP server configured in Administer CiviCRM. Check with your host; the fact that you can connect from outside (i.e., your desktop email client) doesn’t have to mean machines can connect as easily from the network in which your server lives.

Quote from: Denver Dave on November 05, 2007, 12:21:39 pm
Would be a cruel if after getting Drupal installed, CiviCRM installed, CiviCRM available that could not use for emails to contacts, which was the basic requirement in the first place.

You might be interested in using UAS’s service for CiviMail handling.
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.

Denver Dave

  • Ask me questions
  • ****
  • Posts: 471
  • Karma: 9
Re: SMTP Outbound Mail - nothing goes anywhere - ideas ?
November 06, 2007, 07:40:58 am
Thank you for the wonderful replies and lots of ideas!

Quote
Yes, as speleo mentioned, you need the cron entry. You can fake it for test purposes by going to a …mailing/queue URL, which should trigger the CiviMail queue sending.
Am I looking for ...mailing/queue within the civicrm, civimail or my hosting account structure.  I'm on a shared server.

I did find /www/drupal/sites/all/modules/civicrm/CRM/Mailing  (note capital M in Mailing), but not a folder queue

... normally means 3 subdirectories higher, but I'm not sure from what.   

UAS, did look interesting as a possible compromise from hosting everything myself and outsourcing everything.  There is a thread somewhere where this is being discussed.

Thank you !

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: SMTP Outbound Mail - nothing goes anywhere - ideas ?
November 06, 2007, 12:19:35 pm
Quote from: Denver Dave on November 06, 2007, 07:40:58 am
Am I looking for ...mailing/queue within the civicrm, civimail or my hosting account structure.  I'm on a shared server.

Put the following URL in your browser location bar
http://<your drupal site>/civicrm/mailing/queue?reset=1

... and that will push out any mailings in your queue (i.e. scheduled for now or earlier, as well as "send now" mailings).
Protect your investment in CiviCRM by  becoming a Member!

Denver Dave

  • Ask me questions
  • ****
  • Posts: 471
  • Karma: 9
Re: SMTP Outbound Mail - nothing goes anywhere - ideas ?
November 06, 2007, 05:34:20 pm
Dave Greenberg:  What is this - "black magic"?

When I go to a folder that does not exist /civicrm/mailing/queue?reset=1 and presumably run a program that does not exist, because the folder isn't there.  The mail queue is processed like you said it would be.  ..... hmmmmm

I guessed there was a rewrite in the .htaccess file, but don't see anything there.  Obviously, I don't even have a clue what causes the process to even run, let alone how it runs.

What program is really running?   Of course no email seems to be going anywhere and no error messages in any mailbox, but one step along.  Presumably the emails tried to go someplace.
« Last Edit: November 07, 2007, 07:19:55 am by Denver Dave »

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: SMTP Outbound Mail - nothing goes anywhere - ideas ?
November 06, 2007, 11:30:56 pm
Quote from: Denver Dave on November 06, 2007, 05:34:20 pm
When I go to a folder that does not exist /civicrm/mailing/queue?reset=1 and presumably run a program that does not exist, because the folder isn't there.  The mail queue is processed like you said it would be.  ..... hmmmmm

This is the way it looks when you have ‘clean URLs’ on, and yes, this is .htaccess rewriting. You can have the same with a q URL variable, because http://civicrm-19/civicrm/mailing?reset=1 is the same as http://civicrm-19/?q=civicrm/mailing&reset=1 (Drupal takes case of the URL handling for you).

Quote from: Denver Dave on November 06, 2007, 05:34:20 pm
What program is really running?

Drupal’s index.php, which asks CiviCRM for the main area contents (handling to CiviCRM the query string).

Quote from: Denver Dave on November 06, 2007, 05:34:20 pm
Of course no email seem to be going anywhere and no error messages in any mailbox, but one step along.  Presumably the emails tried to go someplace.

You need to check your server logs. You can also edit the packages/Net/SMTP.php file around line 72 and change var $_debug = false; to var $_debug = true; – this will turn on SMTP debugging. You can then try sending yourself an email with the ‘Send Email to Contact’ functionality and see whether any errors come up.
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.

Denver Dave

  • Ask me questions
  • ****
  • Posts: 471
  • Karma: 9
Re: SMTP Outbound Mail - nothing goes anywhere - ideas ?
November 07, 2007, 09:55:17 am
After changing $_debug to true in packages/Net/SMTP.php , at the top of the screen in the debug area there is a message: Recv: 535 Incorrect authentication data , which would seem to indicate my settings are off. 

I've double checked the SMTP username in Home › CiviCRM › Administer CiviCRM › Global Settings   Settings - SMTP Configuration - looks fine

civicrm.settings.php looks fine in
 * SMTP Server Authentication Password:
define( 'CIVICRM_SMTP_PASSWORD', 'passwordhere'    ); - my password was there

I have manage to send an SMTP email with a separate script on the same server with the test code from here:
http://email.about.com/od/emailprogrammingtips/qt/et073006.htm

So, must be something off.   Can't see the actual call to the pear SMTP in SMTP.php, I'm searching ... might be there - then I could examine the parameters.

Are there some other settings that need to be established?
Code: [Select]
echo '$host= ' . $host . '<br>';
echo '$port= ' . $port . '<br>';
echo '$localhost= ' . $localhost . '<br><hr>';
The above all look good ( I guess localhost is ok to say localhost ) - that leaves the smtp password ... trying to find pwd .....   

in SMTP.php , function auth seems to show a blank $pwd
echo '<hr>$pwd= ' . $pwd . '<hr>';

Yet, in civicrm.settings.php
define( 'CIVICRM_SMTP_PASSWORD', 'mypasswordhere'    );

Somehow, could it be that the password set in civicrm.settings.php is not making it to SMTP.php?
wonder if the settings file is being used?  let's rename it and see what happens.  System runs the same.... maybe the civicrm.settings.php in the <installation directory>/sites/all/modules/civicrm is not what is being used?  Don't see any other obvious ones around.  Any ideas?

civicrm.config.php - Line 89:  include_once conf_init( ) . '/civicrm.settings.php';
- not sure about the "/" , but nothing at the actual html document root either

This is getting ridiculous, renamed both the civicrm.config.php and civicrm.settings.php files - neither seems to be used or at least runs the same without them.  hmmmmmm...... I'll browse the installation docs again.  Surely there are civicrm settings and config files being used someplace.   ...... ??

Any additional ideas much appreciated - feels like might be getting closer - hope I don't just have a typo. sigh
« Last Edit: November 07, 2007, 11:19:59 am by Denver Dave »

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: SMTP Outbound Mail - nothing goes anywhere - ideas ?
November 07, 2007, 11:14:34 am

Dave:

You might want to consider using someone from the professional servives list at http://civicrm.org/professional/ or using the CiviSMTP service by Shane Hill: http://www.uas.coop/civismtp-account-how-to

I suspect this will be a better use of all our time

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Denver Dave

  • Ask me questions
  • ****
  • Posts: 471
  • Karma: 9
Re: SMTP Outbound Mail - nothing goes anywhere - ideas ?
November 07, 2007, 12:17:55 pm
Donald - thanks for the advice.  It does make sense that an additional exchange is in order.  I posted a request in the Professional Services Section.  There is the whole installation issue and beyond the actual installation, it is obvious that it takes experience to know how to utilize CiviCRM / CiviMail effectively.  http://forum.civicrm.org/index.php/topic,1522.0.html

On the plus side, my immediate issue with smtp emails not going out was related to a different set of config files being used than the ones that I was changing.  I was changing the ones in the <my drupal installation>/sites/all/modules/civicrm and CiviCRM was using the first one that it found which was <my drupal installation>/sites/default - civicrm.settings.php

Your advice for more help is timely, I realize that I'm just barely beginning to understand CiviCRM and CiviMail.

Thanks.


Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • SMTP Outbound Mail - nothing goes anywhere - ideas ?

This forum was archived on 2017-11-26.