+ Start a Discussion
LoxMyth BourneLoxMyth Bourne 

inbound email service - does it work?

Has anyone used the inbound email service? I tried an example close to what's in online help & nothing happens when I send mail to the generated address. And, where does system.debug write out to?
 
 
mtbclimbermtbclimber
Yes it works.

Is your service active?

Have you enabled security features that may be preventing the email from going through?

Finally, yes, you can access the logs if you setup your context user for debug log monitoring which can be configured from Setup > Administration Setup > Monitoring > Debug Logs.
paul-lmipaul-lmi
it most definitely works.  i'm passing about 200 emails a day through it, with multiple services and service email addresses.

you most lilkely have an uncaught exception in your code, which debug logging would help with.
Ron WildRon Wild
If you're using the 'Accept Email From' option to filter out unwanted inbound email you might be filtering out your own messages by accident.

Make sure the email you are sending comes from an SMTP authenticated sender.

For example: If you're using PHP to send the message you may be using the the mail() function.  It's an obvious choice for sending an email, as it's easy to use, but it doesn't authenticate with your SMTP mail server.   You can use the Pear Mail function instead to get around this:

Make sure the pear mail package is installed on your server, then adapt the following code to meet your needs...

<?php
require_once "Mail.php";

$from = "Sandra Sender <sender@example.com>";
$to = "Ramona Recipient <recipient@example.com>";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";

$host = "mail.example.com";
$username = "smtp_username";
$password = "smtp_password";

$headers = array ('From' => $from,
  'To' => $to,
  'Subject' => $subject);
$smtp = Mail::factory('smtp',
  array ('host' => $host,
    'auth' => true,
    'username' => $username,
    'password' => $password));

$mail = $smtp->send($to, $headers, $body);

if (PEAR::isError($mail)) {
  echo("<p>" . $mail->getMessage() . "</p>");
 } else {
  echo("<p>Message successfully sent!</p>");
 }
?>


Hope that helps,




Message Edited by Ron Wild on 04-03-2008 08:40 AM