Mailhost problem
Experts,
Is there anything which can be done to handle the scenarios in which mail server is down for sometime and IDM fails to send emails sent during that time. Can we add a retry? Is there a way to capture this error?
Thanks in Advance,
Just a suggestion... I have IdM running on a Linux server and sending its mail to localhost. Sendmail is responsible for sending the mail to local host. It can be set up to try several times. It actually allows you to obtain good logs for emails IdM send out. You might try looking into this configuration.
Good luck.
Similar Messages
-
Problems in sent of external MAIL with the service SAPCONNECT
Hello all
We configured the service SAPCONNECT in my system quality for sending the mail and this is not problem, I executed tests with direction of mail internal and the are sent without any problem.
But the problems starts is when I sent the mail external and the message that displays is
Status received for this document:
System Messages
Sent on:
25.01.2011 11:29:07
Sent by:
Marco Gerardo Ceballos V.
Status for Recipient xxxxxxx@aaaaa:
No delivery to xxxxxx@aaaaa, as recipient unknown
The request of area of development is send the external mails.
I review the configuration in the transaction SCOT and I not see a problem.
ATTE
Gerardo CeballosHi,
Please check the parameter icm/server_port_1, if this parameter is not set, add in TX RZ10 with the value:
PROT=SMTP,PORT=25
Restart the instance, then create a service user with the S_A.SCON profile.
In the SICF, open the SAPCONNECT service and check the configuration:
Host data: profile parameter = 0 // host configuration= :
Logon Data: Add the service user that you create
Handler List: CL_SMTP_EXT_SAPCONNECT
Save and active
In the SCOT add the domain in menu settings and add the mailhost and port in the SMTP node, Click the button SET in the internet option and add a * in field address area.
Go to SMICM --> Go to --> Services and check that the port that you add in the parameter icm/server_port_1 is active
Go to SBWP and send the message.
Good Luck
AG -
Problem with Email Notification in Oracle 10g
Hello Guys,
I have the following simple stored procedure for notifying emails.The procedure is getting executed successfully, but no email is being sent to mailbox, any help is appreciable.!! I'm very new to write this pl/sql stuff..!!! This is a very Urgent issue, need help ASAP.Thanks
Source Code:
CREATE OR REPLACE PROCEDURE Test_mail (sender IN VARCHAR2,
recipient IN VARCHAR2,
message IN VARCHAR2)
IS
mailhost VARCHAR2(30) := 'mail.sfsu.edu';
mail_conn utl_smtp.connection;
BEGIN
mail_conn := utl_smtp.open_connection(mailhost, 25);
utl_smtp.helo(mail_conn, mailhost);
utl_smtp.mail(mail_conn, sender);
utl_smtp.rcpt(mail_conn, recipient);
utl_smtp.data(mail_conn, message);
utl_smtp.quit(mail_conn);
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('error');
END Test_mail;Thanks for ur help,
I got the below msg in command prompt when I fired telnet mailserver 25
..could not open connection to host, connection failed.
So how to sort out this problem?
How does mailserver 25 points to my smtp server (mail.sfsu.edu)?
is there any otherway to test? either yahoo or gmail?
Thanks, looking farward to ur reply, appreciate ur help. -
[Wine] - How to deal with undetected ALSA Device problem
All hail Google and Archwiki
sorry for that nonsense, I'm just too happy after two days trying to make my speaker work with Wine. For those who get same problem with me (Wine didn't detect your ALSA device correctly and/or didn't list it on winecfg), this is simple workaround to get them working.
Note: In oppose to Wiki's advice to install wine-suse from AUR, I use Wine from Community repo. AUR install always give me "WARNING: Dependencies have been installed before the failure" error
Additional note: Using this workaround. One may get error when try to use sound test within winecfg, and you'll likely get this error message on terminal:
fixme:wave:ALSA_ComputeCaps Device has a minimum of 2 channels
As far as google can tell, this will bring no harm to your box, unless proven otherwise
1. First thing first, if you don't know which device you should use, check it with 'cat /proc/asound/devices', else skip to step 3,
bam ~/Desktop > cat /proc/asound/devices
2: : timer
3: [ 0- 0]: digital audio playback
4: [ 0- 0]: digital audio capture
5: [ 0- 0]: hardware dependent
6: [ 0] : control
7: : sequencer
8: [ 1- 0]: digital audio playback
9: [ 1- 0]: digital audio capture
10: [ 1] : control
2. Pick each device marked audio playback and test the output:
bam ~/Desktop > aplay -D hw:1,0 /usr/share/sounds/alsa/Front_Center.wav
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
if you get this error:
aplay: set_params:1059: Channels count non available
replace hw:x,y with plughw:x,y.
3. After you get the working device number (e.g: hw:1,0), launch regedit
wine regedit
navigate to HKEY_CURRENT_USER\Software\Wine
4. Create new key named Alsa Driver , make new yalues as follow
[Software\\Wine\\Alsa Driver]
#disable auto scan sound card
"AutoScanCards"="N"
#specify number of output device
"DeviceCount"="1"
#point it to your hw number
"DeviceCTLn"="hw:1"
#same as above
"DevicePCMn"="hw:1"
#optional: direct hardware interface
"UseDirectHW"="Y"
detailed explanations can be found in Wine wiki (link on bottom)
5. close and test it by launching an apps (using test sound in winecfg will give you error!).
6. If your settings correct, you'll get your sound working
Hope this help someone
references:
http://alsa.opensrc.org/index.php/DigitalOut
http://wiki.winehq.org/UsefulRegistryKeys
ps: Sorry for misspelled word/gramatical error, I'm not too good on English.domain_uplevel only affects how we do LDAP search. It will have no effect on users that are not in your LDAP,.
Setting up a "domain smarthost" will cause messages addressed to unknown users to be routed to the host placed in the "smarthost". That would handle your issue, as long as the second box is "authoratative" for your domain, and doesn't send messages it doesn't know what to do with, to the Messaging Server.
Or, you could add all the users to your LDAP, and put the "mailhost" to msg2. That will route their mails over to the other box. -
I just installed the SC 6 Update 2 all component in the same server....when i try to create a user with delegate admin i have the following error
/opt/sun/comms/da/bin/commadmin -v user create -D admin -n domain.com -l username -d domain.com -w password -S mail,cal -H servername.domain.com
FAIL
*5088:Error message required. missing resource string -> norgsmd null*
the only way to make work is if I remove the " -S mail,cal". I enable mail & cal to be use with convergence, the object exist in the LDAP because the admin user that was created with the installation has all the objectsclass needed for calendar and mail, so if I login into convergence I see the calendar and email folders...
and then a I run the command /opt/sun/comm/im/sbin/imadmin assign_services to assign the services to all users in a specific domain and it executes without problem but without changes...the users still have the same objectclass
the complete output of the command is :
bash-3.00# /opt/sun/comms/da/bin/commadmin -v user create -D admin -n domain.com -l username -d domain.com -w 12345 -S mail,cal
[Debug]: DBG:Object = user ; task = create
[Debug]: default domain from Properties: domain.com
[Debug]: IShost from Properties: mail.domain.com
[Debug]: ISPort from Properties: 80
[Debug]: Contacting : http://mail.domain.com:80/commcli/auth
[Debug]: To servlet: domain=domain.com&username=admin&password=12345&charsetenc=UTF-8
[Debug]: cookie => JSESSIONID=6777b671e5fb7eee49f1851ec1a3; Path=/commcli
[Debug]: RECV: OK
[Debug]: RECV: OK
[Debug]: RECV: dn: uid=admin, ou=People, o=domain.com,dc=domain,dc=com
[Debug]: RECV: nsroledn: cn=Top-level Admin Role,dc=domain,dc=com
[Debug]: RECV:
[Debug]: DBG: before getobjtaskargs
[Debug]: In getObjTaskArgs for: user; create
[Debug]: Contacting : http://mail.domain.com:80/commcli/climap
[Debug]: Sending to servlet: task=create&object=user
[Debug]: getObjTaskArgs Status: 0
[Debug]: Number of servlets: 1
[Debug]: Servlet Name: TaskManager
[Debug]: Servlet args: task=CreateUser
[Debug]: Servlet args: objecttype=User
[Debug]: Valid Options Array: 8
d, true, , false, true, user's domain, domain, ,
l, true, , true, true, user's login ID, add_uid, ,
F, true, , true, true, user's first name, add_givenname, ,
L, true, , true, true, user's last name, add_sn, ,
I, true, , false, true, user's middle initial, add_initials, ,
W, true, , true, true, user's password, add_userpassword+confirm_userpassword, ,
S, true, , false, true, service(s) to be added , add_services, mail={H;true;#;false;true;user's mail host;add_mailhost;#},{E;true;#;false;true;user's email address;add_mail;#}::cal={E;true;#;false;true;user's email address;add_mail;#},{B;true;#;false;true;user's back end calendar server;add_icsdwphost;#},{J;true;#;false;true;first day of the week;add_icsfirstday;#},{T;true;#;false;true;user's timezone;add_icstimezone;#},{k;true;#;false;true;calendar version - legacy or hosted domain;cal_version;#},
A, true, , false, true, attribute to add, <attr name>:<value>, add_, ,
[Debug]: DBG: getObjTaskArgs done
[Debug]: servInfo len = 1
Enter user's password: 123456789
[Debug]: argVal =domain.com
[Debug]: servCommand =task=CreateUser&objecttype=User&domain=domain.com
[Debug]: argVal =username
[Debug]: servCommand =task=CreateUser&objecttype=User&domain=domain.com&add_uid=username
[Debug]: argVal =test
[Debug]: servCommand =task=CreateUser&objecttype=User&domain=domain.com&add_uid=username&add_givenname=test
[Debug]: argVal =test
[Debug]: servCommand =task=CreateUser&objecttype=User&domain=domain.com&add_uid=username&add_givenname=test&add_sn=test
[Debug]: argVal =123456789
[Debug]: servCommand =task=CreateUser&objecttype=User&domain=domain.com&add_uid=username&add_givenname=test&add_sn=test&add_userpassword=123456789
[Debug]: argVal =123456789
[Debug]: servCommand =task=CreateUser&objecttype=User&domain=domain.com&add_uid=username&add_givenname=test&add_sn=test&add_userpassword=123456789&confirm_userpassword=123456789
[Debug]: argVal =mail
[Debug]: servCommand =task=CreateUser&objecttype=User&domain=domain.com&add_uid=username&add_givenname=test&add_sn=test&add_userpassword=123456789&confirm_userpassword=123456789&add_services=mail
[Debug]: argVal =cal
[Debug]: servCommand =task=CreateUser&objecttype=User&domain=domain.com&add_uid=username&add_givenname=test&add_sn=test&add_userpassword=123456789&confirm_userpassword=123456789&add_services=mail&add_services=cal
[Debug]: Contacting : http://mail.domain.com:80/commcli/TaskManager
[Debug]: To servlet: task=CreateUser&objecttype=User&domain=domain.com&add_uid=username&add_givenname=test&add_sn=test&add_userpassword=123456789&confirm_userpassword=123456789&add_services=mail&add_services=cal
[Debug]: RECV: FAIL
*[Debug]: RECV: 5088:Error message required. missing resource string -> norgsmd null*
[Debug]: CLITask: status returned =FAIL
FAIL
*5088:Error message required. missing resource string -> norgsmd null*
[Debug]: DBG: doOne returned code=6
[Debug]: Contacting : http://mail.domain.com:80/commcli/logout
[Debug]: Logout ...
any help will much appreciated
CAKenGra wrote:
I found the problem, the default domain that was created during the installation did not have all the objectclass needed, such as calendaruser etc....Did you remember to run the "./commadmin domain modify -S mail -S cal -H mailhost" for the default domain after the installation of Delegated Administrator?
Regards,
Shane. -
David Powers Dreamweaver CS5 with PHP training from the source mail connector problem
Hello,
first I will say great work david this is great book, and i found everything i neede in it.
I have one problem.
I have managed to get to lesson 8 and i couldnt wait so i started live project and incororated everything in it learned from this book.
But this is the problem.
I have hosting on bluehost which makes mail conector from lessons 7-8 with gmail not to send email in example when i try to recover forgoten password.
The scripts changes the token in database in users table, token is created, and i get message that the mail was sent but nothing comes to my mail.
Same password login and everything works local but on bluehost server wont send mail.
I contacted them and they said that i have to create mail on server from which mail will be sent.
I did that too.
But for what ever i put in mailconector array cant get that mail, and i really dont know what to do and who to ask.
Until this point i could get every problem solved put this bugs me because this is the last stage of what i was tryong to do and that is to incorporate login system from the book to live page.
this is the code i have:
<?php
$mailhost='ssl://mail.majapanic-tarot.com';
$mailconfig=array( 'auth' => 'true',
'username' => '[email protected]',
'password' => 'password',
'ssl' => 'ssl',
'port' => '465');
$transport=new Zend_Mail_Transport_Smtp($mailhost,$mailconfig);
Zend_Mail::setDefaultTransport($transport);
and this is what they stated in info about the mail:
Mail Server Username: majapanic+majapanic-tarot.com >>>>>>>> this plus i think is (at)
Incoming Mail Server: mail.majapanic-tarot.com
Incoming Mail Server: (SSL) box344.bluehost.com
Outgoing Mail Server: mail.majapanic-tarot.com (server requires authentication) port 26
Outgoing Mail Server: (SSL) mail.majapanic-tarot.com (server requires authentication) port 465
Supported Incoming Mail Protocols: POP3, POP3S (SSL/TLS), IMAP, IMAPS (SSL/TLS)
Supported Outgoing Mail Protocols: SMTP, SMTPS (SSL/TLS)
Please HELP!FIXED!!
1)
i finally did get the message problem was with:
$mailhost='ssl://mail.domain.com';
ssl:// was just nonsense and been removed
2)
'auth' => 'true' was changed to 'auth' => 'login'
3)
for bluehost i got information that it was tls secure connection protocol not ssl
'ssl' => 'tls'
4)
port used '25' not 465.
Didnt still tried 26 and 465 maybe they would work too. -
I have currently installed Brightmail 5.5 to run with my iPlanet 5.2 Messaging server on Solaris 8. I have followed the directions as specified at: http://docs.sun.com/source/816-6829-10/index.html
I have added the following to option.dat:
Brightmail_Library=/u01/brightmail/lib/libbmiclient.so.1
Brightmail_config_file=/u01/brightmail/etc/brightmail.cfg
LDAP_SPARE_2=mailAntiUBEService
My first question is do i have the proper client library file of libbmiclient.so.1??? There isnt a libbmiclient.so.
I also added the following entry in the tcp_local mail channel in imta.cnf:
sourcebrightmailoptin spam
However when restarting the imsimta via cnbuild and refresh, I get the following error:
Unknown group identifier sourcebrightmail s found on channel tcp_local
Unknown group identifier spam found on channel tcp_local
Unknown group identifier sourcebrightmail s found on channel tcp_local
Unknown group identifier spam found on channel tcp_local
When I try to send through test spam per the brightmail test directions, it gets through no problem. I would greatly appreciate any insight as to what I am missing. Thanks,
PeteA little long but.....
./imsimta test -rewrite -debug [email protected]
Initializing mm_.
Initializing mm_ submission.
Checking identifiers.
*** Debug output from initializing MM for submission:
13:22:26.78: mmc_winit('l','[email protected]','[email protected]') called.
13:22:26.78: Queue area size 1493686, temp area size 1493686
13:22:26.78: 373421 blocks of effective free queue space available; setting disk limit accordingly.
13:22:26.78: Rewriting: Mbox = "postmaster", host = "hcr.hcrintl.com", domain = "$*", literal = "", tag = ""
13:22:26.78: Rewrite: "$*", position 0, hash table -
13:22:26.78: Found: "$E$F$U%[email protected]$V$H"
13:22:26.78: Rewrite failed, not forward.
13:22:26.78: Rewrite: "$*", position 1, hash table -
13:22:26.78: Failed.
13:22:26.78: Rewrite: "$*", position 0, rewrite database -
13:22:26.78: Failed
13:22:26.78: Rewriting: Mbox = "postmaster", host = "hcr", domain = "hcr.hcrintl.com", literal = "", tag = ""
13:22:26.78: Rewrite: "hcr.hcrintl.com", position 0, hash table -
13:22:26.78: Found: "$U%[email protected]"
13:22:26.78: New mailbox: "postmaster".
13:22:26.78: New host: "hcr.hcrintl.com".
13:22:26.78: New route: "hcr.hcrintl.com".
13:22:26.78: New channel system: "hcr.hcrintl.com".
13:22:26.78: Looking up host "hcr.hcrintl.com".
13:22:26.78: - found on channel l
13:22:26.78: Routelocal flag set; scanning for % and !
13:22:26.78: Rewriting: Mbox = "postmaster", host = "hcr.hcrintl.com", domain = "$*", literal = "", tag = ""
13:22:26.78: Rewrite: "$*", position 0, hash table -
13:22:26.78: Found: "$E$F$U%[email protected]$V$H"
13:22:26.78: Rewrite failed, not forward.
13:22:26.78: Rewrite: "$*", position 1, hash table -
13:22:26.78: Failed.
13:22:26.78: Rewrite: "$*", position 0, rewrite database -
13:22:26.79: Failed
13:22:26.79: Rewriting: Mbox = "postmaster", host = "hcr", domain = "hcr.hcrintl.com", literal = "", tag = ""
13:22:26.79: Rewrite: "hcr.hcrintl.com", position 0, hash table -
13:22:26.79: Found: "$U%[email protected]"
13:22:26.79: New mailbox: "postmaster".
13:22:26.79: New host: "hcr.hcrintl.com".
13:22:26.79: New route: "hcr.hcrintl.com".
13:22:26.79: New channel system: "hcr.hcrintl.com".
13:22:26.79: Looking up host "hcr.hcrintl.com".
13:22:26.79: - found on channel l
13:22:26.79: Routelocal flag set; scanning for % and !
13:22:26.79: Mapped return address: [email protected]
*** Debug output from rewriting a forward header address:
13:22:26.79: Rewriting: Mbox = "brightmail", host = "hcrnetwork.com", domain = "$*", literal = "", tag = ""
13:22:26.79: Rewrite: "$*", position 0, hash table -
13:22:26.79: Found: "$E$F$U%[email protected]$V$H"
13:22:26.79: Rewrite failed, not envelope.
13:22:26.79: Rewrite: "$*", position 1, hash table -
13:22:26.79: Failed.
13:22:26.79: Rewrite: "$*", position 0, rewrite database -
13:22:26.79: Failed
13:22:26.79: Rewriting: Mbox = "brightmail", host = "hcrnetwork", domain = "hcrnetwork.com", literal = "", tag = ""
13:22:26.79: Rewrite: "hcrnetwork.com", position 0, hash table -
13:22:26.79: Found: "$U%[email protected]"
13:22:26.79: New mailbox: "brightmail".
13:22:26.79: New host: "hcrnetwork.com".
13:22:26.79: New route: "hcr.hcrintl.com".
13:22:26.79: New channel system: "hcr.hcrintl.com".
13:22:26.79: Looking up host "hcr.hcrintl.com".
13:22:26.79: - found on channel l
13:22:26.79: Routelocal flag set; scanning for % and !
13:22:26.79: Rewrite rules result: [email protected]
13:22:26.79: Checking reverse URL cache for: [email protected]
13:22:26.79: Applying reverse URL pattern ldap:///$V?mail?sub?$Q to: [email protected]
13:22:26.83: Resulting URL: ldap:///o%3Dhcrnetwork.com%2Co%3Dhcrintl.com?mail?sub?(|([email protected])([email protected]))
13:22:26.83: mmc_open_url called to open ldap:///o%3Dhcrnetwork.com%2Co%3Dhcrintl.com?mail?sub?(|([email protected])([email protected])), flags = 256
13:22:26.83: URL with quotes stripped: ldap:///o%3Dhcrnetwork.com%2Co%3Dhcrintl.com?mail?sub?(|([email protected])([email protected]))
13:22:26.83: LDAP URL identified
13:22:26.83: URL context #1 will be used
13:22:26.83: Performing URL search on: ldap:///o%3Dhcrnetwork.com%2Co%3Dhcrintl.com?mail?sub?(|([email protected])([email protected]))
13:22:26.84: mmc_read_url result: [email protected]
13:22:26.84: URL resolution returned: [email protected]
forward channel = l
channel description =
channel user filter =
dest channel filter =
source channel filter =
channel flags #0 = BIDIRECTIONAL MULTIPLE IMMNONURGENT NOSERVICEALL
channel flags #1 = NOSMTP DEFAULT
channel flags #2 = COPYSENDPOST COPYWARNPOST POSTHEADONLY HEADERINC NOEXPROUTE
channel flags #3 = NOLOGGING NOGREY NORESTRICTED RETAINSECURITMULTIPARTS
channel flags #4 = EIGHTBIT NOHEADERTRIM NOHEADERREAD RULES
channel flags #5 =
channel flags #6 = LOCALUSER REPORTHEADER
channel flags #7 = NOSWITCHCHANNEL NOREMOTEHOST DATEFOUR DAYOFWEEK
channel flags #8 = NODEFRAGMENT EXQUOTA REVERSE NOCONVERT_OCTET_STREAM
channel flags #9 = NOTHURMAN INTERPRETENCODING USEINTERMEDIATE RECEIVEDFROM VALIDATELOCALSYSTEM NOTURN
defaulthost = hcrnetwork.com hcrnetwork.com
linelength = 1023
channel env addr type = SOURCEROUTE
channel hdr addr type = SOURCEROUTE
channel official host = hcr.hcrintl.com
channel queue 0 name = LOCAL_POOL
channel queue 1 name = LOCAL_POOL
channel queue 2 name = LOCAL_POOL
channel queue 3 name = LOCAL_POOL
channel after params =
channel user name =
urgentnotices = 1 2 4 7
normalnotices = 1 2 4 7
nonurgentnotices = 1 2 4 7
channel rightslist ids =
local behavior flags = %x7
backward channel = l
header To: address = [email protected]
header From: address = [email protected]
envelope To: address = [email protected] (route (hcr.hcrintl.com,hcr.hcrintl.com)) (host hcrnetwork.com)
envelope From: address = [email protected]
name =
mbox = brightmail
Extracted address action list:
[email protected]
Extracted 733 address action list:
[email protected]
Address list expansion:
brightmail@ims-ms-daemon
1 expansion total.
*** Debug output from submitting an envelope address:
13:22:26.90: mmc_wadr(0x00067d98,'[email protected]','[email protected]') called.
13:22:26.90: Copy estimate before address addition is 1
13:22:26.90: Parsing address [email protected]
13:22:26.90: Rewriting: Mbox = "brightmail", host = "hcrnetwork.com", domain = "$*", literal = "", tag = ""
13:22:26.90: Rewrite: "$*", position 0, hash table -
13:22:26.90: Found: "$E$F$U%[email protected]$V$H"
13:22:26.90: Match, pattern = "hcrnetwork.com", current = "(*domaincheck*)"
13:22:26.90: old state = not checked.
13:22:26.90: Using result 0 from domain match cache.
13:22:26.90: new state = fail pending.
13:22:26.90: Rewrite failed due to channel mismatch.
13:22:26.90: Rewrite: "$*", position 1, hash table -
13:22:26.90: Failed.
13:22:26.90: Rewrite: "$*", position 0, rewrite database -
13:22:26.90: Failed
13:22:26.90: Rewriting: Mbox = "brightmail", host = "hcrnetwork", domain = "hcrnetwork.com", literal = "", tag = ""
13:22:26.90: Rewrite: "hcrnetwork.com", position 0, hash table -
13:22:26.90: Found: "$U%[email protected]"
13:22:26.90: New mailbox: "brightmail".
13:22:26.90: New host: "hcrnetwork.com".
13:22:26.90: New route: "hcr.hcrintl.com".
13:22:26.90: New channel system: "hcr.hcrintl.com".
13:22:26.90: Looking up host "hcr.hcrintl.com".
13:22:26.90: - found on channel l
13:22:26.90: Routelocal flag set; scanning for % and !
13:22:26.90: Address [email protected] requires local processing.
13:22:26.90: Variant #1 = [email protected]
13:22:26.90: Variant #2 = *@hcrnetwork.com
13:22:26.90: Checking for [email protected] in the system alias file
13:22:26.90: - not found
13:22:26.90: Checking for *@hcrnetwork.com in the system alias file
13:22:26.90: - not found
13:22:26.90: Checking [email protected] with URL template ldap:///$V?*?sub?$R
13:22:26.90: LDAP URL template identified
13:22:26.91: URL determined to be: ldap:///o%3Dhcrnetwork.com%2Co%3Dhcrintl.com?*?sub?(|([email protected])([email protected])([email protected]))
13:22:26.91: URL context #1 will be used
13:22:26.91: Using cached LDAP result for URL info: ldap:///$V?*?sub?$R|[email protected]|[email protected]
13:22:26.91: Scanning LDAP result.
13:22:26.91: Attribute: objectclass
13:22:26.91: Attribute index: 0
13:22:26.91: Attribute: inetuserstatus
13:22:26.91: Attribute index: 1
13:22:26.91: Attribute: mailuserstatus
13:22:26.91: Attribute index: 2
13:22:26.91: Attribute: uid
13:22:26.91: Attribute index: 4
13:22:26.91: Attribute: mail
13:22:26.91: Attribute index: 5
13:22:26.91: Attribute: mailhost
13:22:26.91: Attribute index: 9
13:22:26.91: Attribute: mailAntiUBEService
13:22:26.91: Attribute index: 16
13:22:26.91: Attribute: mailDeliveryOption
13:22:26.91: Attribute index: 18
13:22:26.91: Scanning complete, begin actions
13:22:26.91: Object class: userpresenceprofile
13:22:26.91: Object class: inetlocalmailrecipient
13:22:26.91: Object class: inetmailuser
13:22:26.91: Object class: nslicenseuser
13:22:26.91: Object class: nsManagedPerson
13:22:26.91: Object class: ipUser
13:22:26.91: Object class: inetSubscriber
13:22:26.91: Object class: inetUser
13:22:26.91: Object class: hcrinetorgperson
13:22:26.91: Object class: inetOrgPerson
13:22:26.91: Object class: organizationalPerson
13:22:26.91: Object class: person
13:22:26.91: Object class: top
13:22:26.91: User status = active
13:22:26.91: Mail user status = active
13:22:26.91: User UID brightmail found.
13:22:26.91: Processing mailhost attribute hcr.hcrintl.com
13:22:26.91: Mailhost references local system
13:22:26.91: Optin: spam
13:22:26.91: Delivery option: mailbox
13:22:26.92: Delivery options value: 1
13:22:26.92: No reprocess flag on user, processing now
13:22:26.92: Status for this entry = 1
13:22:26.92: - URL match for [email protected]
13:22:26.92: Delivery option template: $M%$\$2I$_+$2S@ims-ms-daemon
13:22:26.92: - brightmail@ims-ms-daemon
13:22:26.92: Parsing address brightmail@ims-ms-daemon
13:22:26.92: Rewriting: Mbox = "brightmail", host = "ims-ms-daemon", domain = "$*", literal = "", tag = ""
13:22:26.92: Rewrite: "$*", position 0, hash table -
13:22:26.92: Found: "$E$F$U%[email protected]$V$H"
13:22:26.92: Match, pattern = "ims-ms-daemon", current = "(*domaincheck*)"
13:22:26.92: old state = not checked.
13:22:26.92: Using result 0 from domain match cache.
13:22:26.92: new state = fail pending.
13:22:26.92: Rewrite failed due to channel mismatch.
13:22:26.92: Rewrite: "$*", position 1, hash table -
13:22:26.92: Failed.
13:22:26.92: Rewrite: "$*", position 0, rewrite database -
13:22:26.92: Failed
13:22:26.92: Rewriting: Mbox = "brightmail", host = "ims-ms-daemon", domain = "ims-ms-daemon", literal = "", tag = ""
13:22:26.92: Rewrite: "ims-ms-daemon", position 0, hash table -
13:22:26.92: Failed.
13:22:26.92: Rewrite: "ims-ms-daemon", position 0, rewrite database -
13:22:26.92: Failed
13:22:26.92: Looking up host "ims-ms-daemon".
13:22:26.92: - found on channel ims-ms
13:22:26.92: - orig_send_access mapping check: l|[email protected]|l|[email protected]
13:22:26.92: - passed.
13:22:26.92: - send_access mapping check: l|[email protected]|ims-ms|brightmail@ims-ms-daemon
13:22:26.92: - passed.
13:22:26.92: - Brightmail initialization failure: Cannot load Brightmail bmiEndHeaders
13:22:26.92: - adding address [email protected] to headers.
13:22:26.92: Copy estimate after address addition is 1
Expanded address:
[email protected]
Submitted address list:
Address list error -- 4.7.1 Cannot load Brightmail bmiEndHeaders: [email protected]
Submitted notifications list:
Im also looking to adjust loggin on the MTA. -
hello again! : ( I have problems with receiving mails, my
installation is local, therefore I am using telnet but it marks errors
to me you have some idea?
bash-2.03# telnet pegaso.qoslabs.com 25
Trying 192.168.20.20...
Connected to hostname.com.
Escape character is '^]'.
220 pegaso.qoslabs.com -- Server ESMTP (Sun ONE Messaging Server 6.0 Patch 1 (built Jan 28 2004))
MAIL FROM: [email protected]
250-2.5.0 No HELO/EHLO seen; continuing anyway, [192.168.20.20].
250 2.5.0 Address Ok.
RCPT TO: [email protected]
550 5.1.1 unknown or illegal alias: [email protected]
RCPT TO: katiuskac
550 5.1.1 unknown or illegal alias: user
DATA
554 5.5.0 No recipients have been specified.
QUIT
221 2.3.0 Bye received. Goodbye.
Connection closed by foreign host.
what is the solution?
do you have any idea?If the MTA believes that you have an error, it will give you the 5.5.1 error.
The error may be any of several provisioning problems. Since you haven't sent me the ldap entry for the user, I really can't tell which error you may have made.
A common error is the value you placed in "mailhost".
This needs to be the Fully qualified name of your mail server, not an alias. If you desire to use an alias for the system, you need to make additional configurations.
Please believe me, I'm trying to help you, but when there are dozens of possible errors, and I have no data to examine, I can't tell which error you may have made.
I do know that if you correctly provision a user, that user will work. -
Hi Jhe,
Hope you are fine.
I tried to create a mail session using the j2eetutorial14 examples.I did all the necessary settings like giving the mailhost name,defining JNDI name etc as per specification.But its throwing the following error please help me to solve this problem.
Feb 15, 2007 12:28:16 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: development3.s4indsoft.com; p
ort: 3700"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java
:104)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:
152)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
at com.sun.enterprise.naming.NamingManagerImpl.lookup(NamingManagerImpl.java:725)
at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:132)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:286)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at ConfirmerClient.main(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:237)
at com.sun.enterprise.appclient.Main.<init>(Main.java:430)
at com.sun.enterprise.appclient.Main.main(Main.java:99)
Caused by: java.lang.RuntimeException: java.nio.channels.UnresolvedAddressException
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
... 22 more
Caused by: java.nio.channels.UnresolvedAddressException
at sun.nio.ch.Net.checkAddress(Net.java:30)
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:451)
at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
... 23 more
Thanks & Regards,
R.Ramesh.This says it all.
Feb 15, 2007 12:28:16 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: development3.s4indsoft.com; p
ort: 3700"
MeTitus -
UTL_SMTP mail with attachment( Problem in attaching zip file)
Hi All,
I used the below code for sending email with attachment. but when i try to add the message body its not working in the sense its not attaching my file. when i commented that line its attaching the file.
commented lines:
-- utl_smtp.write_data(mail_conn,UTL_TCP.CRLF ||'Body' ||':'|| text || UTL_TCP.CRLF);
--utl_smtp.write_data(mail_conn,UTL_TCP.CRLF||text || UTL_TCP.CRLF );How to resolve this issue???
Complete procedure.
create or replace
procedure sssl_send_mail (
p_sender varchar2,
p_recipient varchar2,
p_cc varchar2,
p_subject varchar2,
p_filename varchar2,
text varchar2) is
--c utl_smtp.connection;
v_raw raw(57);
v_length integer := 0;
v_buffer_size integer := 57;
v_offset integer := 1;
mailhost VARCHAR2(64) := 'xxxxxxxxxx';
port constant number(2):=25;
timeout number :=180;
mail_conn utl_smtp.connection;
p_blob Blob;
temp_os_file bfile;
ex number;
begin
DBMS_LOB.CREATETEMPORARY(p_blob,true);
temp_os_file := BFILENAME ('xxxxxxxx',p_filename);
ex := dbms_lob.fileexists(temp_os_file);
if ex = 1 then
dbms_lob.fileopen(temp_os_file, dbms_lob.file_readonly);
dbms_lob.loadfromfile(p_blob,temp_os_file, dbms_lob.getlength(temp_os_file));
dbms_lob.fileclose(temp_os_file);
end if;
mail_conn := utl_smtp.open_connection(mailhost, port,timeout);
utl_smtp.helo(mail_conn, mailhost);
utl_smtp.mail(mail_conn, p_sender);
utl_smtp.rcpt(mail_conn, p_recipient);
utl_smtp.rcpt(mail_conn, p_cc);
utl_smtp.open_data(mail_conn);
utl_smtp.write_data(mail_conn,'From'||':'|| p_sender || UTL_TCP.CRLF);
utl_smtp.write_data(mail_conn,'To'||':'|| p_recipient || UTL_TCP.CRLF);
utl_smtp.write_data(mail_conn,'CC'||':'|| p_cc || UTL_TCP.CRLF);
utl_smtp.write_data(mail_conn,'Subject' ||':'|| p_subject || UTL_TCP.CRLF);
-- utl_smtp.write_data(mail_conn,UTL_TCP.CRLF ||'Body' ||':'|| text || UTL_TCP.CRLF);
--utl_smtp.write_data(mail_conn,UTL_TCP.CRLF||text || UTL_TCP.CRLF );
utl_smtp.write_data( mail_conn, 'Content-Disposition: attachment; filename="' || p_filename || '"' || utl_tcp.crlf);
utl_smtp.write_data( mail_conn, 'Content-Transfer-Encoding: base64' || utl_tcp.crlf );
utl_smtp.write_data( mail_conn, utl_tcp.crlf );
v_length := dbms_lob.getlength(p_blob);
<<while_loop>>
while v_offset < v_length loop
dbms_lob.read( p_blob, v_buffer_size, v_offset, v_raw );
utl_smtp.write_raw_data( mail_conn, utl_encode.base64_encode(v_raw) );
utl_smtp.write_data( mail_conn, utl_tcp.crlf );
v_offset := v_offset + v_buffer_size;
end loop while_loop;
utl_smtp.write_data( mail_conn, utl_tcp.crlf );
utl_smtp.close_data(mail_conn);
utl_smtp.quit(mail_conn);
exception
when utl_smtp.transient_error or utl_smtp.permanent_error then
utl_smtp.quit(mail_conn);
raise;
when others then
raise;
end;Please help me out to resolve this issue.
Thanks in advance.
Cheers ,
Shan.
Edited by: Shan on 13 Jan, 2011 1:08 PM
Edited by: Shan on 14 Jan, 2011 3:22 PMHi,
Some Problems i am facing with this procedure. when i try to add CC in this procedure. Its sending the mail for recipent , But the CC person not getting the mail. How to resolve this??
create or replace
PROCEDURE sssl_send_mail( p_sender varchar2,
p_recipient varchar2,
p_cc varchar2,
p_subject varchar2,
p_filename varchar2,
text varchar2) is
/*LOB operation related varriables */
v_src_loc BFILE;
l_buffer RAW(200);
l_amount BINARY_INTEGER := 200;
l_pos INTEGER := 1;
l_blob BLOB := EMPTY_BLOB;
l_blob_len INTEGER;
v_amount INTEGER;
/*UTL_SMTP related varriavles. */
v_connection_handle UTL_SMTP.CONNECTION;
v_from_email_address VARCHAR2(200);
v_to_email_address VARCHAR2(200) ;
v_smtp_host VARCHAR2(10) ;
v_subject VARCHAR2(500) ;
l_message VARCHAR2(3000);
/* This send_header procedure is written in the documentation */
PROCEDURE send_header(pi_name IN VARCHAR2, pi_header IN VARCHAR2) AS
BEGIN
--dbms_output.put_line('entering into procedure');
--dbms_output.put_line(pi_name || ': ' || pi_header);
UTL_SMTP.WRITE_DATA(v_connection_handle,
pi_name || ': ' || pi_header || UTL_TCP.CRLF);
END;
BEGIN
v_src_loc := BFILENAME('BROKERREPORTS',p_filename);
v_from_email_address := p_sender;
v_to_email_address := p_recipient;
v_smtp_host := 'sbssld1'; --My mail server, replace it with yours.
v_subject := p_subject;
l_message := 'test';
/*Preparing the LOB from file for attachment. */
DBMS_LOB.OPEN(v_src_loc, DBMS_LOB.LOB_READONLY); --Read the file
DBMS_LOB.CREATETEMPORARY(l_blob, TRUE); --Create temporary LOB to store the file.
v_amount := DBMS_LOB.GETLENGTH(v_src_loc); --Amount to store.
DBMS_LOB.LOADFROMFILE(l_blob, v_src_loc, v_amount); -- Loading from file into temporary LOB
l_blob_len := DBMS_LOB.getlength(l_blob);
/*UTL_SMTP related coding. */
v_connection_handle := UTL_SMTP.OPEN_CONNECTION(host => v_smtp_host);
UTL_SMTP.HELO(v_connection_handle, v_smtp_host);
UTL_SMTP.MAIL(v_connection_handle, v_from_email_address);
UTL_SMTP.RCPT(v_connection_handle, v_to_email_address);
UTL_SMTP.OPEN_DATA(v_connection_handle);
send_header('From', v_from_email_address || '<'||'>');
send_header('TO', v_to_email_address || '<'||'>');
send_header('CC', p_cc || '<'||'>');
send_header('Subject', v_subject);
--MIME header.
UTL_SMTP.WRITE_DATA(v_connection_handle,
'MIME-Version: 1.0' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
'Content-Type: multipart/mixed; ' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
' boundary= "' || 'SAUBHIK.SECBOUND' || '"' ||
UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
-- Mail Body
UTL_SMTP.WRITE_DATA(v_connection_handle,
'--' || 'SAUBHIK.SECBOUND' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
'Content-Type: text/plain;' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
' charset=US-ASCII' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle, l_message || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
-- Mail Attachment
UTL_SMTP.WRITE_DATA(v_connection_handle,
'--' || 'SAUBHIK.SECBOUND' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
'Content-Type: application/octet-stream' ||
UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
'Content-Disposition: attachment; ' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
' filename="' || p_filename || '"' || --My filename
UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
'Content-Transfer-Encoding: base64' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
/* Writing the BLOL in chunks */
WHILE l_pos < l_blob_len LOOP
DBMS_LOB.READ(l_blob, l_amount, l_pos, l_buffer);
UTL_SMTP.write_raw_data(v_connection_handle,
UTL_ENCODE.BASE64_ENCODE(l_buffer));
UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
l_buffer := NULL;
l_pos := l_pos + l_amount;
END LOOP;
UTL_SMTP.WRITE_DATA(v_connection_handle, UTL_TCP.CRLF);
-- Close Email
UTL_SMTP.WRITE_DATA(v_connection_handle,
'--' || 'SAUBHIK.SECBOUND' || '--' || UTL_TCP.CRLF);
UTL_SMTP.WRITE_DATA(v_connection_handle,
UTL_TCP.CRLF || '.' || UTL_TCP.CRLF);
UTL_SMTP.CLOSE_DATA(v_connection_handle);
UTL_SMTP.QUIT(v_connection_handle);
DBMS_LOB.FREETEMPORARY(l_blob);
DBMS_LOB.FILECLOSE(v_src_loc);
EXCEPTION
WHEN OTHERS THEN
UTL_SMTP.QUIT(v_connection_handle);
DBMS_LOB.FREETEMPORARY(l_blob);
DBMS_LOB.FILECLOSE(v_src_loc);
sssl_internal_error_track(sqlcode,sqlerrm,'SSSL_SEND_MAIL',NULL);
END;Thanks in Advance.
Cheers,
Shan.
Edited by: Shan on 13 Jan, 2011 12:33 PM
Edited by: Shan on 13 Jan, 2011 1:05 PM -
Chinese problem in Java Mail "Subject"
I got a problem in displaying the Chinese mail subject as described below
1. here is the code
Message msg = new MimeMessage(session);
msg.setFrom(new InternetAddress(from));
msg.setRecipient(Message.RecipientType.TO, new InternetAddress(to));
msg.setSubject(subject);
msg.setSentDate(new Date());
msg.setContent(content, "text/plain");
Transport.send(msg);
2. My env is
Windows 2000
weblogic 7
3. My problem is
the chinese character in the mail context is OK but the subject in the mail is
like this "?????"
Can someone give me the clue ? Thanks a lots
You need to be identified by stmp server :
// Send message with authentication!
Transport tr = session.getTransport("smtp");
tr.connect(MailHost, user, pass);
message.saveChanges(); // don't forget this
tr.sendMessage(message, message.getAllRecipients());
tr.close();
Read JavaMail Faq please! -
Problems on sending mail on Websphere Application Server Community Edition
Hi, i am using the following class for sending mail:-
/**This class encapsulates mailing to any person. it defines method that takes parametres
* such as mail server address,sender and recipient address, userid and password of the
* SMTP account
package src;
import java.util.*;
import javax.mail.*;
import javax.mail.internet.*;
public class Mailer extends javax.mail.Authenticator{
/** The javamail session object. */
protected Session session;
/** The sender's email address */
protected String from;
/**the Username of the account used for authentication*/
protected String user;
/**The password of the mail account*/
protected String password;
/** The subject of the message. */
protected String subject;
/** The recipient ("To:"), as Strings. */
protected ArrayList toList = new ArrayList( );
/** The CC list, as Strings. */
protected ArrayList ccList = new ArrayList( );
/** The BCC list, as Strings. */
protected ArrayList bccList = new ArrayList( );
/** The text of the message. */
protected String body;
/** The SMTP relay host */
protected String mailHost;
/** Get from */
public String getFrom( ) {
return from;
/** Set from */
public void setFrom(String fm) {
from = fm;
/** Get username */
public String getUser( ) {
return user;
/** Set username */
public void setUser(String us) {
user=us;
/** Set password*/
public void setPassword(String password){
this.password=password;
/**Get Password*/
public String getPassword(){
return password;
/** Get subject */
public String getSubject( ) {
return subject;
/** Set subject */
public void setSubject(String subj) {
subject = subj;
// SETTERS/GETTERS FOR TO: LIST
/** Get tolist, as an array of Strings */
public ArrayList getToList( ) {
return toList;
/** Set to list to an ArrayList of Strings */
public void setToList(ArrayList to) {
toList = to;
public void setToList(String s) {
toList = tokenize(s);
/** Add one "to" recipient */
public void addTo(String to) {
toList.add(to);
// SETTERS/GETTERS FOR CC: LIST
/** Get cclist, as an array of Strings */
public ArrayList getCcList( ) {
return ccList;
/** Set cc list to an ArrayList of Strings */
public void setCcList(ArrayList cc) {
ccList = cc;
/** Set cc as a string like "tom, mary, robin@host". Loses any
* previously-set values. */
public void setCcList(String s) {
ccList = tokenize(s);
/** Add one "cc" recipient */
public void addCc(String cc) {
ccList.add(cc);
// SETTERS/GETTERS FOR BCC: LIST
/** Get bcclist, as an array of Strings */
public ArrayList getBccList( ) {
return bccList;
/** Set bcc list to an ArrayList of Strings */
public void setBccList(ArrayList bcc) {
bccList = bcc;
/** Set bcc as a string like "tom, mary, robin@host". Loses any
* previously-set values. */
public void setBccList(String s) {
bccList = tokenize(s);
/** Add one "bcc" recipient */
public void addBcc(String bcc) {
bccList.add(bcc);
// SETTER/GETTER FOR MESSAGE BODY
/** Get message */
public String getBody( ) {
return body;
/** Set message */
public void setBody(String text) {
body = text;
/** Check if all required fields have been set before sending.
* Normally called e.g., by a JSP before calling doSend.
* Is also called by doSend for verification.
public boolean isComplete( ) {
if (from == null || from.length( )==0) {
System.err.println("doSend: no FROM");
return false;
if (subject == null || subject.length( )==0) {
System.err.println("doSend: no SUBJECT");
return false;
if (toList.size( )==0) {
System.err.println("doSend: no recipients");
return false;
if (body == null || body.length( )==0) {
System.err.println("doSend: no body");
return false;
if (mailHost == null || mailHost.length( )==0) {
System.err.println("doSend: no server host");
return false;
return true;
public void setServer(String s) {
mailHost = s;
/** Send the message.
public synchronized void doSend( ) throws MessagingException {
if (!isComplete())
throw new IllegalArgumentException("doSend called before message was complete");
/** Properties object used to pass props into the MAIL API */
Properties props = new Properties( );
props.put("mail.smtp.host", mailHost);
props.put("mail.smtp.user",user);
props.put("mail.smtp.auth", "true");
if (session == null) {
session = Session.getDefaultInstance(props,null);
// create a message
final Message mesg = new MimeMessage(session);
InternetAddress[] addresses;
// TO Address list
addresses = new InternetAddress[toList.size( )];
for (int i=0; i<addresses.length; i++)
addresses[i] = new InternetAddress((String)toList.get(i));
mesg.setRecipients(Message.RecipientType.TO, addresses);
// From Address
mesg.setFrom(new InternetAddress(from));
// CC Address list
addresses = new InternetAddress[ccList.size( )];
for (int i=0; i<addresses.length; i++)
addresses[i] = new InternetAddress((String)ccList.get(i));
mesg.setRecipients(Message.RecipientType.CC, addresses);
// BCC Address list
addresses = new InternetAddress[bccList.size( )];
for (int i=0; i<addresses.length; i++)
addresses[i] = new InternetAddress((String)bccList.get(i));
mesg.setRecipients(Message.RecipientType.BCC, addresses);
// The Subject
mesg.setSubject(subject);
// Now the message body.
mesg.setText(body);
// Finally, send the message!
new Thread( ) {
public void run( ) {
try {
String protocol = "smtp";
Transport t = session.getTransport(protocol);
try {
t.connect(mailHost,user,password);
t.sendMessage(mesg,mesg.getAllRecipients());
} finally {
t.close();
} catch (MessagingException e) {
throw new IllegalArgumentException(
"Transport.send() threw: " + e.toString( ));
}.start( );
/** Convenience method that does it all with one call. */
public static void send(String mailhost,String recipient, String sender,String user,String password, String subject, String message) throws MessagingException {
Mailer m = new Mailer( );
m.setServer(mailhost);
m.addTo(recipient);
m.setFrom(sender);
m.setUser(user);
m.setPassword(password);
m.setSubject(subject);
m.setBody(message);
m.doSend( );
/** Convert a list of addresses to an ArrayList. This will work
* for simple names like "tom, [email protected], 123.45@c$.com"
* but will fail on certain complex (but RFC-valid) names like
* "(harish, munish) <[email protected]>".
* Or even "Ian Darwin <[email protected]>".
protected ArrayList tokenize(String s) {
ArrayList al = new ArrayList( );
StringTokenizer tf = new StringTokenizer(s, ",");
// For each word found in the line
while (tf.hasMoreTokens( )) {
// trim blanks, and add to list.
al.add(tf.nextToken().trim( ));
return al;
}Then i am using the following code snippet in a servlet to send mail by using the static send function of the above class.
try {
src.Mailer.send("smtp.mail.yahoo.co.in","[email protected]","[email protected]","gaurav_s_pandey","tinGSPyahootin","Subject of Servlet Mail","This is the mail sent by servlet run on geronimo");
out.println("Request sent Successfully!!!");
} catch (MessagingException ex) {
out.println("Error Sending Request!!! Check Network Settings!!!");
}My problem is that it is not working on Websphere ApplicationServer Community Edition ,but the same code and servlet is running and sending mails as desired on Apache Tomcat...
Can some one help me plzzz as i have to make it run on WAS CE only and not tomcat....You didn't say anything about what exactly "not working" means.
Some details would help debug the problem.
My understanding is that WebSphere Community Edition is essentially just
Apache Geronimo. I believe Geronimo has its own version of JavaMail that
might not work as well as the Sun version that is usually included with Tomcat.
If that's the source of the problem, you'll need to ask for help in the Geronimo
support forum. -
Problem with Java Mail Program
Hi Everyone...
Please help me to sort out this problem...
I am getting this Exception while executing the code pasted below...
javax.mail.AuthenticationFailedException
at javax.mail.Service.connect(Service.java:306)
at javax.mail.Service.connect(Service.java:156)
at javax.mail.Service.connect(Service.java:105)
at javax.mail.Transport.send0(Transport.java:168)
at javax.mail.Transport.send(Transport.java:98)
at JDCSend.main(JDCSend.java:38)
It's just a simple java program to send an email using JavaMail API
import java.io.*;
import java.util.*;
import javax.mail.*;
import javax.mail.event.*;
import javax.mail.internet.*;
import java.util.Properties;
public class JDCSend {
public static void main (String args[]) {
try{
String from = "[email protected]";
String to = "[email protected]";
String host = "smtp.yahoo.com";
// Get system properties
Properties props = System.getProperties();
props.put("mail.smtp.host", host);
props.put("mail.smtp.port", 465);
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.starttls.enable","true");
// Get session
Session session = Session.getDefaultInstance(props, null);
// Define message
MimeMessage message = new MimeMessage(session);
message.setFrom(new InternetAddress(from));
message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
message.setSubject("Hello, JDC");
message.setText("Welcome to the JDC");
// Send message
Transport.send(message);
catch(Exception e){ e.printStackTrace(); }
}You need to be identified by stmp server :
// Send message with authentication!
Transport tr = session.getTransport("smtp");
tr.connect(MailHost, user, pass);
message.saveChanges(); // don't forget this
tr.sendMessage(message, message.getAllRecipients());
tr.close();
Read JavaMail Faq please! -
David Powers Lesson08 forgotten.php problem
I have a strange problem when running forgotten.php. The program works alright initially with the setting of mail_connector.php as below. I managed to send and received email. Everything works fine intially. After sometime, I found problem running the same program again. This time it generates error message of 'Notice: Underfined index: [email protected] in c:\vhosts\phpcs5\lesson8\scripts\request_reset.php on line 25' and also message 'No connection could be made because the target machine actively refused it.'
Any idea why ?
Mail_Connector.php
<?php
$mailhost = 'mail.agri-organica.com';
$mailconfig = array('auth' => 'login',
'username' => '[email protected]',
'password' => 'password');
$transport = new Zend_Mail_Transport_Smtp($mailhost, $mailconfig);
Zend_Mail::setDefaultTransport($transport);I changed the From header using agri-organica.com address and send to yahoo address. This time it shows:
'No connection could be made because the target machine actively refused it.'
Request Received
An email has been sent to your registered address with instructions for resetting your password.
Request_reset.php
<?php
$errors = FALSE;
$result = FALSE;
if ($_POST) {
require_once('library.php');
require_once('mail_connector.php');
try {
$val = new Zend_Validate_EmailAddress();
if (!$val->isValid($_POST['email'])) {
$errors = TRUE;
if (!$errors) {
$sql = $dbRead->quoteInto('SELECT user_id, first_name, family_name, email FROM users WHERE email = ?', $_POST['email']);
$result = $dbRead->fetchRow($sql);
if (!$result) {
$errors = TRUE;
} else {
// update database and send mail
$token = md5(uniqid(mt_rand(), TRUE));
$data = array('token' => $token);
$where = $dbWrite->quoteInto('email = ?', $_POST['email']);
$dbWrite->update('users', $data, "user_id = {$result['user_id']}");
$mail = new Zend_Mail('UTF-8');
$mail->addTo($result['email'], "{$result['first_name']} {$result['family_name']}");
$mail->setSubject('Instructions for resetting your password');
$mail->setFrom('[email protected]', 'Calvin');
$link = "http://phpcs5/lesson8/reset.php?id={$result['user_id']}&token=$token";
$message = "Use the following link to reset your password. This link can be used once only. $link";
$mail->setBodyText($message, 'UTF-8');
$mail->send();
} catch (Exception $e) {
echo $e->getMessage(); -
Mailing list problem. Users added in mgrpAllowedBroadcaster cant send email
Hi,
I have problem with making some new mailing list and updating some old ones.
I made a list named [email protected] and i wanted only specific senders to be able to send to the list so i added them in mgrpAllowedBroadcaster attribute in the Directory Server.
When i sent email from my pc (my email adress included in mgrpAllowedBroadcaster) with a mail client to the list i got
Delivery Notification: Delivery has failed
Your message cannot be delivered to the following recipients:
Recipient address: [email protected]
Reason: you are not allowed to use this list: [email protected]
If i use webmail (Messanger express) the message gets normaly delivered to all the members of the list.
The webmail is on the same machine with the Messaging Server that has the mailboxes so its a local delivery.
I have 3 mail servers in my configuration. Outgoing mail server with sendmail (out.mydoman.com) , an spam/antivirus box (spam.mydomain.com) and the messaging server (pop.mydomain.com).
The delivery failure for the list was always sent by the messaging server.
I tried contacting each of my servers with telnet on port 25 and send an email to the list.
If i contacted the outgoing mail server the message was not delivered to the list and i got the same error as with the mail client on my PC.
(email goes to outgoing --> spam box --> messaging server)
If i contacted the spam/antivirus box then the message was delivered normaly to the recipients in the list
If i contacted the Message store box then its was normaly delivered.
I added a gmail account to the mgrpAllowedBroadcaster and when i sent email from it the message was delivered normaly to the list.
I get no error when i try
./imsimta test -rewrite [email protected] [email protected]
Some more INFO
Messaging server:
./imsimta version
Sun Java(tm) System Messaging Server 6.3-8.03 (built Apr 24 2009; 32bit)
libimta.so 6.3-8.03 (built 18:43:46, Apr 24 2009; 32bit)
SunOS pop3 5.10 Generic_141415-10 i86pc i386 i86pc
Some logfiles mail.log_current
First lines for a successful delivery to list and later lines for a failure
18-Sep-2009 13:24:40.96 68a.0fe5.17648 tcp_intranet reprocess EE 2 [email protected] rfc822;[email protected] [email protected] /opt/SUNWmsgsr/data/queue/reprocess/ZZg1F0bxtoU_a.00 <[email protected]> mailsrv spam.mydomain.com ([xxx.xxx.xxx.xxx]) '' 0
18-Sep-2009 13:24:41.00 0a33.1.7 reprocess D 3 [email protected] rfc822;[email protected] [email protected] /opt/SUNWmsgsr/data/queue/reprocess/ZZg1F0bxtoU_a.00 <[email protected]> mailsrv '' 1
18-Sep-2009 13:32:17.99 68a.100f.17822 tcp_intranet reprocess EE 2 [email protected] rfc822;[email protected] [email protected] /opt/SUNWmsgsr/data/queue/reprocess/ZZg1F0byvoG_p.00 <DA983A6AD2F043F58BB7BDC733AE8C8D@mydomaindlzcyvo4sp8> mailsrv spam.mydomain.com ([xxx.xxx.xxx.xxx]) '' 0
18-Sep-2009 13:32:24.22 0a57.1.2 reprocess R 2 [email protected] rfc822;[email protected] [email protected] /opt/SUNWmsgsr/data/queue/reprocess/ZZg1F0byvoG_p.00 <DA983A6AD2F043F58BB7BDC733AE8C8D@mydomaindlzcyvo4sp8> mailsrv '' you are not allowed to use this list: [email protected] 7mmhm please send the ldif form this email-list
This is an example of a email list ldif:
dn: cn=mylist,ou=Groups,o=mydomain.com,o=isp
uniqueMember: uid=ram,ou=People,o=mydomain.com,o=isp
mgmanMemberVisibility: NONE
mgmanJoinability: NONE
mail: [email protected]
objectClass: inetlocalmailrecipient
objectClass: inetmailgroupmanagement
objectClass: top
objectClass: inetmailgroup
objectClass: groupofuniquenames
mailHost: mailserver.mydomain.com
inetMailGroupStatus: active
cn: Email Test List
mgmanHidden: false
mgrpRFC822MailMember: [email protected]
mgrpAllowedBroadcaster: uid=ram,ou=People,o=mydomain.com,o=isp
mgrpAllowedBroadcaster: mailto:[email protected]
mgrpAllowedBroadcaster: mailto:[email protected]
mgrpMsgRejectAction: reply
Ram
Maybe you are looking for
-
Replacing a german version with a united states version
I really don't want to delete my mozilla web browser because I really managed all my tabs and I dont want to change or lose them. however I downloaded mozilla when i lived in Germany and I am now having a hard time trying to switch it over to the US
-
How do you merge events in photo (iPhoto) on the iPad? The (for me) normal Wayne in iPhoto of dragthing one event over THE other did not wrok Tia Wilco
-
Hi, I have a probleme, i install the Jdeveloper 1012 base and the sdk 1.4.2_04 but when i click on the libraries node in tool > default project properties this message appears : " An error has occured click detail for information that may be useful w
-
Keywords don't works...
Hello! I have started to put keywords in my library. I have made my preset and I usually add keywords from keywords bar. I have a big problem when I search with Query HUD: some keywords when selected/checked in the query hud doesn't show the photos!
-
Is there a point to Safari?
Genuine question not meant to "inflame" passions. Made the switch to Mac about a year ago (still running XP PC for work). Have been using Firefox on PC and now on Mac. I occasionally have started up Safari, but for the life of me cannot see any upsid