PROBLEM IN SENDING MAIL TO POSITIONS THROUGH SEND MAIL STEP
Hi Experts,
I am facing some problems in sending mail to positions from the organization structure from the send mail step.When I am using user as the recipient type it is working fine...but when i am choosing S position as the recipient type it is giving the error in the workflow log stating that method SENDTASKDESCRIPTION cannot be executed.
I need to find a solution urgently...any suggestion would be sincerely appreciated.
thanks.
Narsingh
Well you have probably tried this.. but just a recheck.
1 . send email setep select Organizational Object
2. Recipient Type Organizational Unit
3. Here do an F4 and then select the Unit...
Try this SAP behaves weirdly at times...
after this do Refresh Buffers.. and Org Unit...
Let us know if this works
Similar Messages
-
I'm unable to send and receive email through Apple Mail 4. I've checked my settings on Preferences, and my password to Gmail is up to date for syncing with IMAP, but it still won't connect. Suggestions?
I think it's trying to open it in a gMail eMail & is losing your gMail password that it needs log into gMail, but not 100% positive.
Have you tried Right clicking or Control+click on the eMail link & choose Copy? Works on some, not others. -
When I try to send a document out through my e-mail, it does not open for me to send e-mail. This was never a problem it seems until last Pages update. What do you recommend?
We are not mind readers.
What version of Pages (don't say latest), and version of OS X? -
Sending Workitem as attacment through send mail
Hi all
I got an issue while doing Parking Documents relase in FI. My issue is when ever a document is parked from F-65 a work item containing the relese procedure should be send through an email to the sap inbox. All is working fine except i dont no how to attach the work item to the mail.
can any one please help out. how to attach workitem to the mail.
thanks.Hi
can you tell me in breif . as i have to do attachment whenver the document is parked .
Means i am using activity step for releasing the parked documents using FIPP Object and RELEASE method. this work item should be sent through send mail step Which is configured in SWDB after activity step . where can i use the function module wapi_create_attachment -
Difficulty sending attached wProjector files through e-mail
Does anybody know why the "exe" in wProjector.exe files are deemed to be "Illegal" by the Web Postmaster?
I tried to send one attached to an e-mail this afternoon and it was returned. Need help!exe (executable) files are probably the highest on the list of files that can carry viruses or otherwise do malicious damage to the machines they land in during their travels.
exe files generally run by doubleclicking them, without the need for supporting software. Years ago, people with malicious tendencies would have viral exe files attached to emails which baited/misled the recipient into opening the file (running it by simply clicking it) -
Sending Output of SQL Through UTL Mail
Hello,
We have oracle 10gR2 on sun solaris.
I need to email an output of a SQL Qurey by using utl_mail or some other method.
Can anyone of you point on how I can do that.
ThanksI am spooling the output to a file and trying to send as an attachment. I receive the mail with an text.txt attachment , but it does not show the actual data. Am I doing wrong in any declaration.And that is the wrong thing to do. Do not spool anything to file. It is not needed.
First you need to understand how an e-mail looks like. It has a header - this includes the subject, the recipients, the sender, and so on. A blank line. Then the e-mail body follows. The e-mail body can have boundary lines, splitting the body into parts. A part can be, for example, an attachment. This part will contain the type of data in that boundary. And in the case of an attachment, the filename to use to save that boundary's contents as a file.
And this is what UTL_MAIL does - it creates such an e-mail body for you. It puts the contents of the attachment parameter into the e-mail body. It uses the filename in the header part of that boundary to tell the e-mail reader what the filename is for that contents.
Using the following UTL_MAIL code:
SQL> declare
2 begin
3 SYS.UTL_MAIL.send_attach_varchar2(
4 sender => '[email protected]'
5 ,recipients => '[email protected]'
6 ,cc => NULL
7 ,bcc => NULL
8 ,subject => 'Sample Mail from UTL_MAIL'
9 ,message => 'This line will be written to message '||
10 'body - a boundary will be written after it to write the attachment.'
11 ,mime_type => 'text/plain; charset=us-ascii'
12 ,priority => 2
13 ,attachment => '<html><table><tr><td>Row 1</td><td>data..</td></tr>'||
14 '<tr><td>Row 2</td><td>data..</td></tr></table></html>'
15 ,att_inline => TRUE
16 ,att_mime_type => 'text/html'
17 ,att_filename => 'sample-attachment.html'
18 );
19 end;
20 /
PL/SQL procedure successfully completed.Results in the following e-mail being generated and send via SMTP:
From: [email protected]
To: [email protected]
Subject: =?ISO-8859-1?Q?Sample=20Mail=20from=20UTL=5FMAIL?=
X-Priority: 2
Content-Type: multipart/mixed; boundary="------------4D8C24=_23F7E4A13B2357B3"
Return-Path: [email protected]
Date: 12 Nov 2009 07:20:52 +0200
Mime-Version: 1.0
This is a multi-part message in MIME format.
--------------4D8C24=_23F7E4A13B2357B3
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
This line will be written to message body - a boundary will be written after it to write the attachment.
--------------4D8C24=_23F7E4A13B2357B3
Content-Type: text/html; name="sample-attachment.html"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline; filename="sample-attachment.html"
<html><table><tr><td>Row 1</td><td>data..</td></tr><tr><td>Row 2</td><td>da=
ta..</td></tr></table></html>
--------------4D8C24=_23F7E4A13B2357B3-- -
If I send a message directly through Messages, that forwarded message does not appear in the message box.
But I would like to not have that message as the template for my texts.
How do I take this "template" out?
Thank youu!I have taken it back to the Apple store genius bar, but they say they don't see anything wrong. Well unless you use it all day and experience the problems when they happen, you wont see anything wrong. But there are lots wrong with it. But this would be the same store as I purchased the phone. And they backed up my old Iphone 4, but were not able to get anything to load back onto my new phone. So, I lost pretty much everything. But over time, some of my contacts have started showing up, although i am still missing over 800 of them.
-
How to send generated Spool file through e-mail
Hi,
We have a ABAP report which generates a spool file. Now there is a requirement to send this spool file to our clients external mail boxes.
Also we would like to automate this so that whenever a spool file is generated, the system should automatically send it as an attachment to user mail inboxes.
Any idea how I can achieve this. Thanks is advance!
Regards,
Vikrant.Hi Vikrant,
Have a look at this code...
z_send_email_fax_global
FUNCTION-POOL z_gfaian_mail_fax. "MESSAGE-ID ..
WORK TABLE AREAS
TABLES: tsp01.
INTERNAL TABLES
DATA: lt_rec_tab LIKE STANDARD TABLE OF soos1 WITH HEADER LINE,
lt_note_text LIKE STANDARD TABLE OF soli WITH HEADER LINE,
lt_attachments LIKE STANDARD TABLE OF sood5 WITH HEADER LINE.
DATA: lt_objcont LIKE STANDARD TABLE OF soli WITH HEADER LINE,
lt_objhead LIKE STANDARD TABLE OF soli WITH HEADER LINE.
DATA: pdf_format LIKE STANDARD TABLE OF tline WITH HEADER LINE.
TYPES: BEGIN OF y_files,
file(60) TYPE c,
END OF y_files.
DATA: lt_files TYPE STANDARD TABLE OF y_files WITH HEADER LINE.
DATA: l_objcont LIKE soli OCCURS 0 WITH HEADER LINE.
DATA: l_objhead LIKE soli OCCURS 0 WITH HEADER LINE.
STRUCTURES
DATA: folder_id LIKE soodk,
object_id LIKE soodk,
link_folder_id LIKE soodk,
g_document LIKE sood4,
g_header_data LIKE sood2,
g_folmem_data LIKE sofm2,
g_header_data LIKE sood2,
g_receive_data LIKE soos6,
g_ref_document LIKE sood4,
g_new_parent LIKE soodk,
l_folder_id LIKE sofdk,
v_email(50).
DATA: hd_dat like sood1.
VARIABLES
DATA: client LIKE tst01-dclient,
name LIKE tst01-dname,
objtype LIKE rststype-type,
type LIKE rststype-type.
DATA: numbytes TYPE i,
arc_idx LIKE toa_dara,
pdfspoolid LIKE tsp01-rqident,
jobname LIKE tbtcjob-jobname,
jobcount LIKE tbtcjob-jobcount,
is_otf.
DATA: outbox_flag LIKE sonv-flag VALUE 'X',
store_flag LIKE sonv-flag,
delete_flag LIKE sonv-flag,
owner LIKE soud-usrnam,
on LIKE sonv-flag VALUE 'X',
sent_to_all LIKE sonv-flag,
g_authority LIKE sofa-usracc,
w_objdes LIKE sood4-objdes.
DATA: c_file LIKE rlgrap-filename,
n_spool(6) TYPE n.
DATA: cancel.
DATA: desired_type LIKE sood-objtp,
real_type LIKE sood-objtp,
attach_type LIKE sood-objtp,
otf LIKE sood-objtp VALUE 'OTF', " SAPscript Ausgabeformat
ali LIKE sood-objtp VALUE 'ALI'. " ABAP lists
CONSTANTS
CONSTANTS: ou_fol LIKE sofh-folrg VALUE 'O',
c_objtp LIKE g_document-objtp VALUE 'RAW',
c_file_ext LIKE g_document-file_ext VALUE 'TXT'.
=================================================================================
z_send_email_fax2
FUNCTION z_faian_mail_fax2.
""Interface local:
*" IMPORTING
*" REFERENCE(SRC_SPOOLID) LIKE TSP01-RQIDENT
*" REFERENCE(FAX_MAIL_NUMBER) TYPE SO_NAME
*" REFERENCE(HEADER_MAIL) TYPE SO_OBJ_DES
*" REFERENCE(OBJECT_TYPE) TYPE SO_ESCAPE
*" TABLES
*" LT_BODY_EMAIL STRUCTURE SOLI
*" EXCEPTIONS
*" ERR_NO_ABAP_SPOOLJOB
Fist part: Verify if the spool really exists
SELECT SINGLE * FROM tsp01 WHERE rqident = src_spoolid.
IF sy-subrc NE 0.
RAISE err_no_abap_spooljob. "doesn't exist
ELSE.
client = tsp01-rqclient.
name = tsp01-rqo1name.
CALL FUNCTION 'RSTS_GET_ATTRIBUTES'
EXPORTING
authority = 'SP01'
client = client
name = name
part = 1
IMPORTING
type = type
objtype = objtype
EXCEPTIONS
fb_error = 1
fb_rsts_other = 2
no_object = 3
no_permission = 4
OTHERS = 5.
IF objtype(3) = 'OTF'.
desired_type = otf.
ELSE.
desired_type = ali.
ENDIF.
CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
EXPORTING
rqident = src_spoolid
desired_type = desired_type
IMPORTING
real_type = real_type
TABLES
buffer = l_objcont
EXCEPTIONS
no_such_job = 14
type_no_match = 94
job_contains_no_data = 54
no_permission = 21
can_not_access = 21
read_error = 54.
IF sy-subrc EQ 0.
attach_type = real_type.
ENDIF.
CALL FUNCTION 'SO_FOLDER_ROOT_ID_GET'
EXPORTING
owner = sy-uname
region = ou_fol
IMPORTING
folder_id = l_folder_id
EXCEPTIONS
OTHERS = 5.
fill out informations about the header of the email
CLEAR: g_document.
g_document-foltp = l_folder_id-foltp.
g_document-folyr = l_folder_id-folyr.
g_document-folno = l_folder_id-folno.
g_document-objtp = c_objtp.
g_document-objdes = header_mail.
g_document-file_ext = c_file_ext.
g_header_data-objdes = header_mail.
CALL FUNCTION 'SO_DOCUMENT_REPOSITORY_MANAGER'
EXPORTING
method = 'SAVE'
office_user = sy-uname
IMPORTING
authority = g_authority
TABLES
objcont = lt_body_email
attachments = lt_attachments
CHANGING
document = g_document
header_data = g_header_data
EXCEPTIONS
OTHERS = 1.
folder_id-objtp = l_folder_id-foltp.
folder_id-objyr = l_folder_id-folyr.
folder_id-objno = l_folder_id-folno.
object_id-objtp = c_objtp.
object_id-objyr = g_document-objyr.
object_id-objno = g_document-objno.
link_folder_id-objtp = l_folder_id-foltp.
link_folder_id-objyr = l_folder_id-folyr.
link_folder_id-objno = l_folder_id-folno.
REFRESH lt_rec_tab.
CLEAR lt_rec_tab.
lt_rec_tab-sel = 'X'.
lt_rec_tab-recesc = object_type. "This field for FAX/MAIL
lt_rec_tab-recnam = 'U-'.
lt_rec_tab-deliver = 'X'.
lt_rec_tab-not_deli = 'X'.
lt_rec_tab-read = 'X'.
lt_rec_tab-mailstatus = 'E'.
lt_rec_tab-adr_name = fax_mail_number.
lt_rec_tab-sortfield = fax_mail_number.
lt_rec_tab-recextnam = fax_mail_number.
lt_rec_tab-sortclass = '5'.
APPEND lt_rec_tab.
lt_rec_tab-recextnam = fax_mail_number.
lt_rec_tab-recesc = object_type.
lt_rec_tab-sndart = 'INT'.
lt_rec_tab-sndpri = 1.
APPEND lt_rec_tab.
lt_files-file = c_file.
APPEND lt_files.
begin of insertion by faianf01
hd_dat-objdes = header_mail.
CALL FUNCTION 'SO_ATTACHMENT_INSERT'
EXPORTING
object_id = object_id
attach_type = attach_type
object_hd_change = hd_dat
owner = sy-uname
TABLES
objcont = l_objcont
objhead = l_objhead
EXCEPTIONS
active_user_not_exist = 35
communication_failure = 71
object_type_not_exist = 17
operation_no_authorization = 21
owner_not_exist = 22
parameter_error = 23
substitute_not_active = 31
substitute_not_defined = 32
system_failure = 72
x_error = 1000.
IF sy-subrc > 0.
ENDIF.
end of insertion by faianf01
send email from SAPOFFICE
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
folder_id = folder_id
object_id = object_id
outbox_flag = outbox_flag
link_folder_id = link_folder_id
owner = sy-uname
check_send_authority = 'X'
TABLES
receivers = lt_rec_tab
note_text = lt_note_text
EXCEPTIONS
active_user_not_exist = 35
communication_failure = 71
component_not_available = 1
folder_no_authorization = 5
folder_not_exist = 6
forwarder_not_exist = 8
object_no_authorization = 13
object_not_exist = 14
object_not_sent = 15
operation_no_authorization = 21
owner_not_exist = 22
parameter_error = 23
substitute_not_active = 31
substitute_not_defined = 32
system_failure = 72
too_much_receivers = 73
user_not_exist = 35.
ENDIF.
ENDFUNCTION.
=================================================================================
z_send_email_fax
FUNCTION ZCBFS_SEND_MAIL.
""Interface local:
*" IMPORTING
*" REFERENCE(SRC_SPOOLID) LIKE TSP01-RQIDENT
*" REFERENCE(HEADER_MAIL) TYPE SO_OBJ_DES
*" TABLES
*" LIST_FAX_MAIL_NUMBER STRUCTURE SOLI
*" EXCEPTIONS
*" ERR_NO_ABAP_SPOOLJOB
DATA: vg_achou(1) TYPE n.
Fist part: Verify if the spool really exists
vg_achou = 1.
DO 60 TIMES.
SELECT SINGLE * FROM tsp01 WHERE rqident = src_spoolid.
IF sy-subrc IS INITIAL.
CLEAR vg_achou.
EXIT.
ELSE.
WAIT UP TO 1 SECONDS.
ENDIF.
ENDDO.
IF vg_achou = 1.
RAISE err_no_abap_spooljob. "doesn't exist
ENDIF.
client = tsp01-rqclient.
name = tsp01-rqo1name.
CALL FUNCTION 'RSTS_GET_ATTRIBUTES'
EXPORTING
authority = 'SP01'
client = client
name = name
part = 1
IMPORTING
type = type
objtype = objtype
EXCEPTIONS
fb_error = 1
fb_rsts_other = 2
no_object = 3
no_permission = 4
OTHERS = 5.
IF objtype(3) = 'OTF'.
desired_type = otf.
ELSE.
desired_type = ali.
ENDIF.
CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
EXPORTING
rqident = src_spoolid
desired_type = desired_type
IMPORTING
real_type = real_type
TABLES
buffer = l_objcont
EXCEPTIONS
no_such_job = 14
type_no_match = 94
job_contains_no_data = 54
no_permission = 21
can_not_access = 21
read_error = 54.
IF sy-subrc EQ 0.
attach_type = real_type.
ENDIF.
CALL FUNCTION 'SO_FOLDER_ROOT_ID_GET'
EXPORTING
owner = sy-uname
region = ou_fol
IMPORTING
folder_id = l_folder_id
EXCEPTIONS
OTHERS = 5.
fill out informations about the header of the email
CLEAR: g_document.
g_document-foltp = l_folder_id-foltp.
g_document-folyr = l_folder_id-folyr.
g_document-folno = l_folder_id-folno.
g_document-objtp = c_objtp.
g_document-objdes = header_mail.
g_document-file_ext = c_file_ext.
g_header_data-objdes = header_mail.
CALL FUNCTION 'SO_DOCUMENT_REPOSITORY_MANAGER'
EXPORTING
method = 'SAVE'
office_user = sy-uname
IMPORTING
authority = g_authority
TABLES
attachments = lt_attachments
CHANGING
document = g_document
header_data = g_header_data
EXCEPTIONS
OTHERS = 1.
folder_id-objtp = l_folder_id-foltp.
folder_id-objyr = l_folder_id-folyr.
folder_id-objno = l_folder_id-folno.
object_id-objtp = c_objtp.
object_id-objyr = g_document-objyr.
object_id-objno = g_document-objno.
link_folder_id-objtp = l_folder_id-foltp.
link_folder_id-objyr = l_folder_id-folyr.
link_folder_id-objno = l_folder_id-folno.
REFRESH lt_rec_tab.
LOOP AT LIST_FAX_MAIL_NUMBER.
lt_rec_tab-recextnam = LIST_FAX_MAIL_NUMBER-LINE.
lt_rec_tab-recesc = 'U'.
lt_rec_tab-sndart = 'INT'.
lt_rec_tab-sndpri = 1.
APPEND lt_rec_tab.
ENDLOOP.
lt_files-file = c_file.
APPEND lt_files.
hd_dat-objdes = header_mail.
CALL FUNCTION 'SO_ATTACHMENT_INSERT'
EXPORTING
object_id = object_id
attach_type = attach_type
object_hd_change = hd_dat
owner = sy-uname
TABLES
objcont = l_objcont
objhead = l_objhead
EXCEPTIONS
active_user_not_exist = 35
communication_failure = 71
object_type_not_exist = 17
operation_no_authorization = 21
owner_not_exist = 22
parameter_error = 23
substitute_not_active = 31
substitute_not_defined = 32
system_failure = 72
x_error = 1000.
IF sy-subrc > 0.
ENDIF.
send email from SAPOFFICE
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
folder_id = folder_id
object_id = object_id
outbox_flag = outbox_flag
link_folder_id = link_folder_id
owner = sy-uname
TABLES
receivers = lt_rec_tab
note_text = lt_note_text
EXCEPTIONS
active_user_not_exist = 35
communication_failure = 71
component_not_available = 1
folder_no_authorization = 5
folder_not_exist = 6
forwarder_not_exist = 8
object_no_authorization = 13
object_not_exist = 14
object_not_sent = 15
operation_no_authorization = 21
owner_not_exist = 22
parameter_error = 23
substitute_not_active = 31
substitute_not_defined = 32
system_failure = 72
too_much_receivers = 73
user_not_exist = 35.
ENDFUNCTION.
Regards,
Santosh -
Sending file in file through E-mail
I think this must be very simple to do, but I have to ask for instructions. All I want to do is to type a short message (one sentence) and put it into a box labeled (?). I would like to be able send the box-in-a-box by E-mail. At the other end, one click on the box with the question mark on it would open to show the message. Simple, but I don't know how to do it. Also, I might as well ask if it would be possible to open the mystery box to see the message and hear music. Well, I can ask, can't I?
Hey
Please have a look at the following blog
/people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
Thanx
Aamir -
Mail with Attachments Not Sending
I have an iMac. For some strange reason, I am no longer able to send emails with attachments through Mac Mail. The Internal Port is 443; the External Port is 80. Any suggestions? This is my computer at work, and we utilize Outlook Express.
Thanks!Are you using POP or IMAP?
The port #s look weird to me, too since 80 is HTTP and 443 is HTTPS (usually used for website traffic)....not necessarily mail ports (which are/can be typically 25, 993, 587, 2000, 143, 110, 995, 465, etc).
If you can post more info about your mail client confiuration/settings, that would be helpful -
IOS5 issue - E-mail app crashes when sending reply. What to do?
It all worked fince since upgrade. Today I tried to reply to an E-mail. When I clicked send button, the whole app crashed back to the home screen. It was still running in the back though. I tried a few more times - after reset - no luck. Help.
turn on your airport mode, then go back to mail app, nav through the mail.
if you don't crash from there, that means it's not your iPhone.
go to your mail browser from computer, and accept invites, delet bounced mail..something like that. then go to your mail app from your iPhone..
I had to accept meeting invites several of them and that take care that.
Good luck to you all!
Message was edited by: papee -
Help Getting AOL mail through my mail App
I was wondering if there was anyway that i can get my Aol mail to go through the mail app on my computer
?Hi Big_papa!
These are the settings, for configuring Apple Mail with AOL mail.
-Account Type: IMAP
-Incoming Mail Server: imap.aol.com
-Outgoing Mail Server: smtp.aol.com:Your AOL Screenname Here
-Server Port: 587
You can also use the utility AOL® Service Assistant, which can be downloaded from this website AOL Macintosh Downloads.
"The AOL Service Assistant enables you to set up the following Apple applications to work with the AOL service:
• Mail - The AOL Service Assistant makes it easy to configure Mac OS X Mail to send and receive AOL mail. If you've used the existing AOL for Mac OS X product, you can also import your incoming and outgoing messages from your Personal Filing Cabinet into Mail.
• iChat - You can now easily set up iChat to work with your Screen Name.
• Address Book - Using the AOL Service Assistant, you can now easily import your AOL Address Book contacts into your Mac OS X Address Book without bringing in duplicate entries.
• Safari - AOL Service Assistant enables you to import your Favorite Places into a folder in the Safari Bookmarks Bar."
ali b -
When send message it's says " messagae send failure" but message already send.why?
when send message it's says " message send failure" but message alredy send.why?
Go through the troubleshooting steps under "If you see 'Waiting for Activation'..." in this article: http://support.apple.com/kb/ts4268.
-
Urgent!!!! Problem in sending mail through yahoo mail server
Hi
I have a yahoo account and I want to send email through yahoo mail server
using my java program. My program supports SMTP server authentication.
But when I connect to the yahoo mail server(smtp.mail.yahoo.com) I got this error
javax.mail.MessagingException: 521 yahoo.com closing transmission channel. You
must be pop-authenticated before you can use this smtp server, and you must use
your yahoo mail address for the Sender/From field.
This is my program
import javax.mail.*;
import java.util.*;
import javax.mail.internet.*;
import javax.mail.event.*;
import java.io.*;
public class JavaMailUserAgent
Properties properties;
Session session;
Message message;
JavaMailUserAgent(String mailHost,String smtpUsername,String smtpPassword) throws Exception
properties=new Properties();
properties.put("mail.smtp.host",mailHost);
ServerAuthenticate auth=new ServerAuthenticate(smtpUsername,smtpPassword);
session=Session.getInstance(properties,auth);
message=new MimeMessage(session);
} //**********************************************************************end constructor
void sendMail(String messageFrom,String messageTo,String subject,String messageBody) throws Exception
properties.put("mail.from",messageFrom);
InternetAddress[] address={ new InternetAddress(messageTo) };
message.setFrom(new InternetAddress(messageFrom));
message.setRecipients(Message.RecipientType.TO,address);
message.setSubject(subject);
message.setContent(messageBody,"text/plain");
Transport transport=session.getTransport(address[0]);
transport.addConnectionListener(new ConnectionHandler());
transport.addTransportListener(new TransportHandler());
transport.connect();
transport.sendMessage(message,address);
} //*************************************************************************end function
} //*************************************************************************************end main
class ConnectionHandler extends ConnectionAdapter
public void opened(ConnectionEvent e)
System.out.println("connection opened");
public void disconnected(ConnectionEvent e)
System.out.println("connection disconnected");
public void closed(ConnectionEvent e)
System.out.println("connection closed");
} //*************************************************************************************end main
class TransportHandler extends TransportAdapter
public void messageDelivered(TransportAdapter e)
System.out.println("message delivered");
public void messageNotDelivered(TransportAdapter e)
System.out.println("message NOT delivered");
public void messagePartiallyDelivered(TransportAdapter e)
System.out.println("message partially delivered");
} //*************************************************************************************end main
class ServerAuthenticate extends Authenticator
String smtpUsername = null;
String smtpPassword = null;
public ServerAuthenticate(String username, String password)
smtpUsername = username;
smtpPassword = password;
protected PasswordAuthentication getPasswordAuthentication()
return new PasswordAuthentication(smtpUsername,smtpPassword);
} //*************************************************************************************end main
I use this code to call the program.
JavaMailUserAgent jmail=new JavaMailUserAgent("smtp.mail.yahoo.com","my_yahoo_username","my_yahoo_password");
jmail.sendMail("[email protected]","[email protected]","test subject","test message");
Could you pls tell me why do I get this error eventhough My program has server authentication.
Is this my program error.Please Helpl me what to do to correct this problem.
Please include a sample code
thanks for listening
sabuI have used the code below to send mail from yahoo account,but I got the error message like below,what I should configure in pop3 of yahoo account????
import javax.mail.*;
import java.util.*;
import javax.mail.internet.*;
import javax.mail.event.*;
import java.io.*;
public class JavaMailUserAgent
Properties properties;
Session session;
Message message;
JavaMailUserAgent(String mailHost,String smtpUsername,String smtpPassword) throws Exception
properties=new Properties();
properties.put("mail.smtp.host",mailHost);
ServerAuthenticate auth=new ServerAuthenticate(smtpUsername,smtpPassword);
session=Session.getInstance(properties,auth);
message=new MimeMessage(session);
//**********************************************************************end constructor
void sendMail(String messageFrom,String messageTo,String subject,String messageBody) throws Exception
properties.put("mail.from",messageFrom);
InternetAddress[] address={ new InternetAddress(messageTo) };
message.setFrom(new InternetAddress(messageFrom));
message.setRecipients(Message.RecipientType.TO,address);
message.setSubject(subject);
message.setContent(messageBody,"text/plain");
Transport transport=session.getTransport(address[0]);
transport.addConnectionListener(new ConnectionHandler());
transport.addTransportListener(new TransportHandler());
transport.connect();
transport.sendMessage(message,address);
} //*************************************************************************end function
} //*************************************************************************************end main
class ConnectionHandler extends ConnectionAdapter
public void opened(ConnectionEvent e)
System.out.println("connection opened");
public void disconnected(ConnectionEvent e)
System.out.println("connection disconnected");
public void closed(ConnectionEvent e)
System.out.println("connection closed");
} //*************************************************************************************end main
class TransportHandler extends TransportAdapter
public void messageDelivered(TransportAdapter e)
System.out.println("message delivered");
public void messageNotDelivered(TransportAdapter e)
System.out.println("message NOT delivered");
public void messagePartiallyDelivered(TransportAdapter e)
System.out.println("message partially delivered");
} //*************************************************************************************end main
class ServerAuthenticate extends Authenticator
String smtpUsername = null;
String smtpPassword = null;
public ServerAuthenticate(String username, String password)
smtpUsername = username;
smtpPassword = password;
protected PasswordAuthentication getPasswordAuthentication()
return new PasswordAuthentication(smtpUsername,smtpPassword);
public static void main(String str[])throws Exception
JavaMailUserAgent jmail=new
JavaMailUserAgent("smtp.mail.yahoo.com","[email protected]","passwordd");
jmail.sendMail("[email protected]","[email protected]","test subject","test message");
ERROR:
E:\mail\javamail\servlet>java ServerAuthenticate
connection opened
Exception in thread "main" javax.mail.MessagingException: 530 authentication req
uired - for help go to http://help.yahoo.com/help/us/mail/pop/pop-11.html
at com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTransport.java:879)
at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:599)
at com.sun.mail.smtp.SMTPTransport.sendMessage(Compiled Code)
at JavaMailUserAgent.sendMail(JavaMailUserAgent.java:58)
at ServerAuthenticate.main(JavaMailUserAgent.java:131)
How Could I rectyfy the above error ?????
Regards,
Mahesh. -
Hello everyone,
There's a problem that's been bugging me for quite some time now. I'm using Mail to handle my gmail email, and everything's working fine, except when i'm connected to my work wifi.
When i'm connected to my work wifi I can't send e-mails. Mail will try to send a message (it shows a loading icon next to the 'Sent' mailbox)
for a few minutes before notifying me that it cannot send the message. When I look at the 'Activity' window, it seems to be stuck on 'checking account connections' and 'sending message'..
The strange thing is, when I switch networks to some other wireless network (my home network, or our neighbors, for example), the message is sent straight away and everything works perfectly.
I'm using the standard gmail settings (smtp.gmail.com, standard ports & password authentication)..
My work router is a Thomson TG789vn.
I hope someone can help :-)
Cheers, Peppoo.
p.s. I just testing sending again, and was able to send 1 email. It took about 20 min to send.. ( :-s ), it was only text.. weird.Hey Lanny, thanks for your reply.
Hmm.. I can't imagine that being the case.. Sending e-mail from the browser works just fine.
-peppoo
Maybe you are looking for
-
Howto send outsream to more than one connected socket at the same time?
Hi, I have a Serversocket socket class which is waiting for connections at a static port. The following code creates the ServerSocket: ServerSocket servsock = new ServerSocket(port); Then Im wating for clients to access to the server. I do it in a wh
-
I deleted some videos on my ipad before synching with my library, and now I can't find them. How can i get them back?
-
Exporting Interval Data in batch INTDEXP
Hi, I'm new to Oracle Utilities, and we've got a request from an internal customer to export interval data for a predefined list of recorders. I've found that you can do this with the INTDEXP.exe tool. And I've managed to get some output. But in the
-
While directly importing with the help of data manager it gives me an error. It doesnt import data from each and every field, it gives me two kins of error 1) some fields dont exist 2) another type of error is unable to find a lookup value. And do su
-
Skype crashes when starting up
I am running skype 7 on win 8.1 and have used skype for many years. Just started having this problem overnight. Very odd, but on starting up skype it crashes "skype has stopped working". Have tried resetting by deleting the DbTemp folder. No change.