-
Can we send mail with different attachments of different mail ids by one java code..
Can we send mail with different attachments for different mail ids by one java code in one click while changing the dates...   
+++++++++++++++++++++++++++++++++++++++++++++++
There are three Different directory's from where attachment should be picked..
for example
Say in dir 1==& the file name is ID0229_1.zip is supposed to go to the mail id xyz@xyz.com..
dir ==1 file name ID0329_1.zip upto id6329_1.zip.
ID0201_1.zip..was the file name..
ID stands for the file name...
02 stands for the Branch ..
01 Stand for the current date..
_1 Stands For the Directory where the data is stored.
zip is the extension..
Last edited by inmybluejens; 06-19-2010 at 08:48 AM.
-
Still waiting for any reply..
-
I would say yes. If you can describe the problem you can probably write code to do it.
-
let me explain it to you .
There are three different directories in which we have 61 zipped files.
say the zip file ID0201_1.zip is supposed to do to the email id 02@aa.com,& similarly with the all 60files & from all three directories..
ID stands for the file name...
02 stands for the Branch name..
01 Stand for the current date..
_1 Stands For the Directory where the data is stored.
-
Your explanation is still lacking. What exactly are you trying to do? Why are there 60 files? Who gets each one? What does the file name format (which you've explained twice) have to do with the problem?
What code do you already have written? Show us where you are by posting the code (in code tags), and specific questions about it. Also post full error/exception messages you have received (also in code tags).
If you want our help, you have to help us. You understand the domain and the problem, we do not. Until we do, we can't be of any real help to you.
That being said, if I understand what you want to do (which is doubtful), you probably want to take in the mail to address, check who it is, then attach the appropriate file based on the name contained in the address. This would be as easily done as a set of if statements or a hash table for lookup. You would look up the base name and add the date to the file name based on whatever criteria you have for date selection (current day, last week, etc.) Make sure you read the names and the files they need from a properties file so you don't have to rebuild the code every time this association changes.
Last edited by ajhampson; 06-23-2010 at 10:50 AM.
Reason: clarification
-
Well i have not written any code for this in java.
let me tell you that I'm have my company's data(Database file) in that file which contains the information about the clients of our company & all the records related to the client's are stored in that file.now we have 60 different offices at different locations & have email id for each.The data will be sent from my office called as HUB to my branch offices..
i hope the this time i made you a little bit to understand.
-
So, you want to
Code:
For each directory
{
Open the directory
Get the list of files
For each file
{
Parse the file name for the office id
Create an email to that office id with the filename as a subject
Attach the file and send the email
}
}
Is this correct?
-
Thankyou for writing Up ,
Code:
Date come first
then is the main directory with the the option to access each directory
{
Open the directory
Get the list of files
For each file
{
Parse the file name for the office id
Create an email to that office id with the filename & directory name as a subject
Attach the file and send the email & with one send click all attachments goes to mailbox.
}
}
I think this can help you little bit.
-
 Originally Posted by inmybluejens
Thankyou for writing Up  ,
Code:
Date come first
then is the main directory with the the option to access each directory
{
Open the directory
Get the list of files
For each file
{
Parse the file name for the office id
Create an email to that office id with the filename & directory name as a subject
Attach the file and send the email & with one send click all attachments goes to mailbox.
}
}
I think this can help you little bit. 
Nope, no help really. 
I don't know what you mean by "Date come first." Do you mean you would first select the date for the data files? Do you have a folder for each day? Then does the day folder have 3 sub folders in it? What is the purpose of the sub folders?
Please remember to use code tags around code and structured algorithms to preserve formatting.
-
Or do you need to simply put today's date as the first entry?
I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
Please use [Code]your code goes in here[/Code] tags when posting code.
Before posting your question, did you look here?
Got a question on Linux? Visit our Linux sister site.
Modifications Required For VB6 Apps To Work On Vista
-
Well It goes like this: first we have to select the date then we chose the main directory which contains the 3 Sub directories named as data1 data2 data3.
-
 Originally Posted by inmybluejens
Well It goes like this: first we have to select the date then we chose the main directory which contains the 3 Sub directories named as data1 data2 data3.
OK, so now you have a plan for the code and we've given you some hints as to what kind of code to write. You should try writing something and post back with your code and questions.
-
Well If i could have Write this code there was no chance to request you to write this.
-
 Originally Posted by inmybluejens
Well If i could have Write this code there was no chance to request you to write this.
Ahhhh. I didn't realize that was what you were doing. Well the fundamental problem is that we don't write code for people here. We're happy to help you define your problem and answer coding questions.
I (like most of the forum members) get paid to do a full-time job and don't really have time to write your entire project for free. You should check out some of the sites where you can get developers to bid on writing code for you.
Good luck.
Similar Threads
-
By Jeromy Payton in forum Web
Replies: 2
Last Post: 03-25-2006, 05:24 PM
-
By Chaitanya Marvici in forum ASP.NET
Replies: 6
Last Post: 07-21-2003, 09:15 AM
-
By Jordan Dragoev Nedelchev in forum Java
Replies: 0
Last Post: 11-29-2002, 04:58 AM
-
Replies: 1
Last Post: 05-08-2002, 07:17 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks